Arbitrary exception class. More...
#include <sysc/kernel/sc_process.h>
Public Member Functions | |
sc_throw_it (const EXCEPT &value) | |
virtual | ~sc_throw_it () |
virtual this_type * | clone () const |
virtual void | throw_it () |
Protected Attributes | |
EXCEPT | m_value |
Arbitrary exception class.
This class serves as a way of throwing an execption for an aribtrary type without knowing what that type is. A true virtual method in the base class is used to actually throw the execption. A pointer to the base class is used internally removing the necessity of knowing what the type of EXCEPT is for code internal to the library.
Note the clone() true virtual method. This is used to allow instances of the sc_throw_it<EXCEPT> class to be easily garbage collected. Since an exception may be propogated to more than one process knowing when to garbage collect is non-trivial. So when a call is made to sc_process_handle::throw_it() an instance of sc_throw_it<EXCEPT> is allocated on the stack. For each process throwing the exception a copy is made via clone(). That allows those objects to be deleted by the individual processes when they are no longer needed (in this implementation of SystemC that deletion will occur each time a new exception is thrown ( see sc_thread_process::suspend_me() ).
Definition at line 301 of file sc_process.h.
sc_core::sc_throw_it< EXCEPT >::sc_throw_it | ( | const EXCEPT & | value | ) | [inline] |
Definition at line 305 of file sc_process.h.
virtual sc_core::sc_throw_it< EXCEPT >::~sc_throw_it | ( | ) | [inline, virtual] |
Definition at line 306 of file sc_process.h.
virtual this_type* sc_core::sc_throw_it< EXCEPT >::clone | ( | ) | const [inline, virtual] |
Implements sc_core::sc_throw_it_helper.
Definition at line 307 of file sc_process.h.
virtual void sc_core::sc_throw_it< EXCEPT >::throw_it | ( | ) | [inline, virtual] |
Implements sc_core::sc_throw_it_helper.
Definition at line 308 of file sc_process.h.
EXCEPT sc_core::sc_throw_it< EXCEPT >::m_value [protected] |
Definition at line 310 of file sc_process.h.