wrapper around an STL list to help with reference counting Provides handles elements in an STL list. When all the handles go out of scope, the element in the list is destroyed. More...
#include <managed_list.h>
Classes | |
class | ElemDeleter |
class | Handle |
class | iterator |
struct | TrackedElem |
Public Types | |
typedef boost::function< void(iterator)> | CustomDeleter |
Public Member Functions | |
Handle | add (const T &elem) |
Add an element to the back of the ManagedList. More... | |
Handle | add (const T &elem, CustomDeleter custom_deleter, const boost::shared_ptr< DestructionGuard > &guard) |
Add an element to the back of the ManagedList, along with a Custom deleter. More... | |
iterator | begin () |
iterator | end () |
void | erase (iterator it) |
Removes an element from the ManagedList. More... | |
ManagedList () | |
Private Member Functions | |
void | defaultDeleter (iterator it) |
Private Attributes | |
std::list< TrackedElem > | list_ |
wrapper around an STL list to help with reference counting Provides handles elements in an STL list. When all the handles go out of scope, the element in the list is destroyed.
Definition at line 88 of file managed_list.h.
typedef boost::function<void (iterator)> actionlib::ManagedList< T >::CustomDeleter |
Definition at line 152 of file managed_list.h.
|
inline |
Definition at line 278 of file managed_list.h.
|
inline |
Add an element to the back of the ManagedList.
Definition at line 283 of file managed_list.h.
|
inline |
Add an element to the back of the ManagedList, along with a Custom deleter.
elem | The element we want to add |
deleter | Object on which operator() is called when refcount goes to 0 |
Definition at line 293 of file managed_list.h.
|
inline |
Definition at line 319 of file managed_list.h.
|
inlineprivate |
Definition at line 322 of file managed_list.h.
|
inline |
Definition at line 318 of file managed_list.h.
|
inline |
Removes an element from the ManagedList.
Definition at line 313 of file managed_list.h.
|
private |
Definition at line 326 of file managed_list.h.