Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
actionlib::ManagedList< T > Class Template Reference

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< TrackedElemlist_
 

Detailed Description

template<class T>
class actionlib::ManagedList< T >

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 56 of file managed_list.h.

Member Typedef Documentation

template<class T>
typedef boost::function<void (iterator)> actionlib::ManagedList< T >::CustomDeleter

Definition at line 88 of file managed_list.h.

Constructor & Destructor Documentation

template<class T>
actionlib::ManagedList< T >::ManagedList ( )
inline

Definition at line 209 of file managed_list.h.

Member Function Documentation

template<class T>
Handle actionlib::ManagedList< T >::add ( const T &  elem)
inline

Add an element to the back of the ManagedList.

Definition at line 214 of file managed_list.h.

template<class T>
Handle actionlib::ManagedList< T >::add ( const T &  elem,
CustomDeleter  custom_deleter,
const boost::shared_ptr< DestructionGuard > &  guard 
)
inline

Add an element to the back of the ManagedList, along with a Custom deleter.

Parameters
elemThe element we want to add
deleterObject on which operator() is called when refcount goes to 0

Definition at line 224 of file managed_list.h.

template<class T>
iterator actionlib::ManagedList< T >::begin ( )
inline

Definition at line 250 of file managed_list.h.

template<class T>
void actionlib::ManagedList< T >::defaultDeleter ( iterator  it)
inlineprivate

Definition at line 253 of file managed_list.h.

template<class T>
iterator actionlib::ManagedList< T >::end ( )
inline

Definition at line 249 of file managed_list.h.

template<class T>
void actionlib::ManagedList< T >::erase ( iterator  it)
inline

Removes an element from the ManagedList.

Definition at line 244 of file managed_list.h.

Member Data Documentation

template<class T>
std::list<TrackedElem> actionlib::ManagedList< T >::list_
private

Definition at line 257 of file managed_list.h.


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


actionlib
Author(s): Eitan Marder-Eppstein, Vijay Pradeep, Mikael Arguedas
autogenerated on Mon Aug 24 2020 03:40:47