Sierra Toolkit Version of the Day
sierra::ParallelThrowRegistry Class Reference

Class ParallelThrowRegistry is a registry of known parallel exceptions. For the negotiation of parallel exceptions, each parallel exception must be registered. The class serves as the registry and registrar for the exceptions. More...

#include <Exception.hpp>

List of all members.

Public Member Functions

template<class T >
ExParallelregisterException ()
 Member template function registerException registers an exception of the specified type with the parallel registry. An exception is provided which is to be cloned whenever a parallel exception of that type is the be created for parallel throwing.
ExParallelfindException (const std::type_info &exception_type)
 Member function findException returns a pointer to the matching exception in parallel exception registry.

Static Public Member Functions

static ParallelThrowRegistryinstance ()
 Member function instance returns the singleton instance for the parallel exception registry.
static bool areExceptionsRegistered ()
 Static member function setExceptionsRegistered sets the exceptions have been registered flag. This flag is used to control the calling of the function sierra_exception_thrown when a parallel exception is created.

Detailed Description

Class ParallelThrowRegistry is a registry of known parallel exceptions. For the negotiation of parallel exceptions, each parallel exception must be registered. The class serves as the registry and registrar for the exceptions.

When an exception is registered, a new exception of that type is provided which is cloned whenever and exception of that type is required.

Two different exception types are registered. The parallel exception type and the base exception type which is discovered using the BaseExceptionType type of the parallel exception class. When the parallel exception registry is searched, the parallel exception to be cloned is returned when either type is found.

During parallel exception processing, the information from exception to be thrown in parallel is stored in the registered exception object.

Definition at line 182 of file Exception.hpp.


Member Function Documentation

ParallelThrowRegistry & sierra::ParallelThrowRegistry::instance ( ) [static]

Member function instance returns the singleton instance for the parallel exception registry.

Returns:
a ParallelThrowRegistry ...

Definition at line 39 of file Exception.cpp.

template<class T >
ExParallel& sierra::ParallelThrowRegistry::registerException ( ) [inline]

Member template function registerException registers an exception of the specified type with the parallel registry. An exception is provided which is to be cloned whenever a parallel exception of that type is the be created for parallel throwing.

Returns:
an ExParallel reference to the x_to_clone exception.

Definition at line 214 of file Exception.hpp.

ExParallel * sierra::ParallelThrowRegistry::findException ( const std::type_info &  exception_type)

Member function findException returns a pointer to the matching exception in parallel exception registry.

Parameters:
exception_typea std::type_info reference to the exception type being searched.
Returns:
an ExParallel pointer to the exception to be cloned.

Definition at line 74 of file Exception.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines