![]() |
VR-Forces 4.8 Class Documentation
|
Functionality for disconnecting the various references that objects make to each other. More...

Public Member Functions | |
| DtDisconnectable () | |
| Default constructor. More... | |
| virtual | ~DtDisconnectable () |
| Destructor. More... | |
| virtual boost::signals2::connection | addDisconnectFunction (const boost::function< void()> &callback) |
| Add a function to be called when callDisconnectFunctions is called. More... | |
| virtual bool | callDisconnectFunctions () |
| Atomically call all the disconnect functions and mark this object as disconnected. More... | |
Protected Types | |
| enum | State { NotUsed, InUse, Disconnected } |
| typedef tbb::spin_mutex | Mutex |
Protected Attributes | |
| Mutex | myMutex |
| State | myDisconnectedState |
| boost::signals2::signal< void()> | myDisconnectSignal |
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.
|
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 |