Classes | Public Member Functions | Private Attributes
actionlib::DestructionGuard Class Reference

This class protects an object from being destructed until all users of that object relinquish control of it. More...

#include <destruction_guard.h>

List of all members.

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_

Detailed Description

This class protects an object from being destructed until all users of that object relinquish control of it.

Definition at line 49 of file destruction_guard.h.


Constructor & Destructor Documentation

Constructor for a DestructionGuard.

Definition at line 55 of file destruction_guard.h.


Member Function Documentation

Definition at line 57 of file destruction_guard.h.

Attempts to protect the guarded object from being destructed.

Returns:
True if protection succeeded, false if protection failed

Definition at line 70 of file destruction_guard.h.

Releases protection on the guarded object.

Definition at line 83 of file destruction_guard.h.


Member Data Documentation

Definition at line 134 of file destruction_guard.h.

Definition at line 133 of file destruction_guard.h.

boost::mutex actionlib::DestructionGuard::mutex_ [private]

Definition at line 131 of file destruction_guard.h.

Definition at line 132 of file destruction_guard.h.


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


actionlib
Author(s): Eitan Marder-Eppstein, Vijay Pradeep, Mikael Arguedas
autogenerated on Sat Feb 16 2019 03:21:29