#include <xvr2/ThreadFinalizator.h>
Definition at line 23 of file ThreadFinalizator.h.
Public Member Functions | |
void | registerFinalizer (FinalizerCallback *f_cb) |
Registers a new finalization callback to be called when thread finalizes. | |
void | registerCancellationCB (FinalizerCallback *f_cb) |
Registers a new cancellation callback to be called in the event of thread cancellation only. | |
void | callFinalizers () |
Calls each finalizer in reverse registration order. | |
void | callCancellationCallbacks () |
Calls each cancellation callback in reverse registration order. | |
void | removeCancellationCBs () |
Removes all cancellation callbacks without executing them. | |
virtual const char * | getClassName () |
Returns the name of the current class. | |
virtual std::string | toString () |
Static Public Member Functions | |
static void | debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Will print a debug message to the screen. | |
static void | debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Protected Member Functions | |
ThreadFinalizator () | |
Protected default constructor to prevent user initialization. | |
Protected Attributes | |
std::deque< FinalizerCallback * > | finalizers |
Doubly-ended queue which stores finalization callbacks. | |
std::deque< FinalizerCallback * > | cancelCBs |
Doubly-ended queue which stores cancellation callbacks. | |
std::string | __cls_name |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const Object &s) |
xvr2::ThreadFinalizator::ThreadFinalizator | ( | ) | [protected] |
Protected default constructor to prevent user initialization.
void xvr2::ThreadFinalizator::registerFinalizer | ( | FinalizerCallback * | f_cb | ) |
Registers a new finalization callback to be called when thread finalizes.
void xvr2::ThreadFinalizator::registerCancellationCB | ( | FinalizerCallback * | f_cb | ) |
Registers a new cancellation callback to be called in the event of thread cancellation only.
void xvr2::ThreadFinalizator::callFinalizers | ( | ) |
Calls each finalizer in reverse registration order.
void xvr2::ThreadFinalizator::callCancellationCallbacks | ( | ) |
Calls each cancellation callback in reverse registration order.
void xvr2::ThreadFinalizator::removeCancellationCBs | ( | ) |
Removes all cancellation callbacks without executing them.
virtual const char* xvr2::Object::getClassName | ( | ) | [virtual, inherited] |
Returns the name of the current class.
static void xvr2::Object::debugmsg | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
Will print a debug message to the screen.
static void xvr2::Object::debugmsgln | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
virtual std::string xvr2::Object::toString | ( | ) | [virtual, inherited] |
std::ostream& operator<< | ( | std::ostream & | stream, | |
const Object & | s | |||
) | [friend, inherited] |
std::deque<FinalizerCallback *> xvr2::ThreadFinalizator::finalizers [protected] |
Doubly-ended queue which stores finalization callbacks.
Definition at line 27 of file ThreadFinalizator.h.
std::deque<FinalizerCallback *> xvr2::ThreadFinalizator::cancelCBs [protected] |
Doubly-ended queue which stores cancellation callbacks.
Definition at line 29 of file ThreadFinalizator.h.
std::string xvr2::Object::__cls_name [protected, inherited] |