$search
This class protects an object from being destructed until all users of that object relinquish control of it. More...
#include <destruction_guard.h>
Classes | |
class | ScopedProtector |
Protects a DestructionGuard until this object goes out of scope. More... | |
Public Member Functions | |
void | destruct () |
DestructionGuard () | |
Constructor for a DestructionGuard. | |
bool | tryProtect () |
Attempts to protect the guarded object from being destructed. | |
void | unprotect () |
Releases protection on the guarded object. | |
Private Attributes | |
boost::condition | count_condition_ |
bool | destructing_ |
boost::mutex | mutex_ |
int | use_count_ |
This class protects an object from being destructed until all users of that object relinquish control of it.
Definition at line 48 of file destruction_guard.h.
actionlib::DestructionGuard::DestructionGuard | ( | ) | [inline] |
Constructor for a DestructionGuard.
Definition at line 53 of file destruction_guard.h.
void actionlib::DestructionGuard::destruct | ( | ) | [inline] |
Definition at line 54 of file destruction_guard.h.
bool actionlib::DestructionGuard::tryProtect | ( | ) | [inline] |
Attempts to protect the guarded object from being destructed.
Definition at line 66 of file destruction_guard.h.
void actionlib::DestructionGuard::unprotect | ( | ) | [inline] |
Releases protection on the guarded object.
Definition at line 77 of file destruction_guard.h.
boost::condition actionlib::DestructionGuard::count_condition_ [private] |
Definition at line 123 of file destruction_guard.h.
bool actionlib::DestructionGuard::destructing_ [private] |
Definition at line 122 of file destruction_guard.h.
boost::mutex actionlib::DestructionGuard::mutex_ [private] |
Definition at line 120 of file destruction_guard.h.
int actionlib::DestructionGuard::use_count_ [private] |
Definition at line 121 of file destruction_guard.h.