SystemC  Recoding Infrastructure for SystemC v0.6.0 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
sc_throw_it< EXCEPT > Class Reference

Arbitrary exception class. More...

#include <sysc/kernel/sc_process.h>

Detailed Description

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 277 of file sc_process.h.


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