tbb::movable_exception< ExceptionData > Class Template Reference

Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread. More...

#include <tbb_exception.h>

Inheritance diagram for tbb::movable_exception< ExceptionData >:

tbb::tbb_exception List of all members.

Public Member Functions

 movable_exception (const ExceptionData &data_)
 movable_exception (const movable_exception &src) throw ()
const movable_exceptionoperator= (const movable_exception &src)
ExceptionData & data () throw ()
const ExceptionData & data () const throw ()
const char * name () const throw ()
 Returns RTTI name of the originally intercepted exception.
const char * what () const throw ()
 Returns the result of originally intercepted exception's what() method.
movable_exceptionmove () throw ()
 Creates and returns pointer to the deep copy of this exception object.
void destroy () throw ()
 Destroys objects created by the move() method.
void throw_self ()
 Throws this exception object.

Protected Attributes

ExceptionData my_exception_data
 User data.

Detailed Description

template<typename ExceptionData>
class tbb::movable_exception< ExceptionData >

Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread.

Code using TBB can instantiate this template with an arbitrary ExceptionData type and throw this exception object. Such exceptions are intercepted by the TBB scheduler and delivered to the root thread ().

See also:
tbb::tbb_exception


Member Function Documentation

template<typename ExceptionData>
void tbb::movable_exception< ExceptionData >::destroy (  )  throw () [inline, virtual]

Destroys objects created by the move() method.

Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method.

Implements tbb::tbb_exception.

template<typename ExceptionData>
movable_exception* tbb::movable_exception< ExceptionData >::move (  )  throw () [inline, virtual]

Creates and returns pointer to the deep copy of this exception object.

Move semantics is allowed.

Implements tbb::tbb_exception.

template<typename ExceptionData>
void tbb::movable_exception< ExceptionData >::throw_self (  )  [inline, virtual]

Throws this exception object.

Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown.

Implements tbb::tbb_exception.


The documentation for this class was generated from the following file:

Copyright © 2005-2013 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.