![]() |
VR-Forces 5.0.2 Developer's Guide
|
Functionality for disconnecting the various references that objects make to each other.
This class is a wrapper around a boost::signal2 which guarantees that each attached function is run once and only once.

Public Member Functions | |
| DtDisconnectable () | |
| virtual | ~DtDisconnectable () |
| virtual boost::signalslib::connection | addDisconnectFunction (const boost::function< void()> &callback) |
| virtual bool | callDisconnectFunctions () |
Protected Types | |
| enum | State { NotUsed, InUse, Disconnected } |
| typedef tbb::spin_mutex | Mutex |
Protected Attributes | |
| Mutex | myMutex |
| State | myDisconnectedState |
| boost::signalslib::signal< void()> | myDisconnectSignal |
|
protected |
|
protected |
| makVrv::DtDisconnectable::DtDisconnectable | ( | ) |
Default constructor.
|
virtual |
Destructor. callDisconnectFunctions is not called in the destructor, it is up to to the caller to call it when it is necessary.
|
virtual |
Add a function to be called when callDisconnectFunctions is called. If it has already been called, then the callback will be called during this call.
|
virtual |
Atomically call all the disconnect functions and mark this object as disconnected. If callDisconnectFunctions has already been called or is currently being called, this call will do nothing.
|
mutableprotected |
|
protected |
|
protected |