Developer Documentation
ObjectIDPointerManagerT< Pointer > Class Template Reference

#include <OpenFlipper/common/ObjectIDPointerManagerT.hh>

Public Types

typedef std::map< int, Pointer > PointerObjectIDMap
 typedef for the idmap
 
typedef std::pair< int, Pointer > PointerObjectIDPair
 typedef for the pairs
 

Public Member Functions

 ObjectIDPointerManagerT ()
 Constructor.
 
 ~ObjectIDPointerManagerT ()
 Destructor.
 
bool get_pointer (int _identifier, Pointer &_pointer)
 
Pointer get_pointer (int _identifier)
 
bool add_pointer (int _identifier, const Pointer &_pointer)
 
bool delete_object (int _identifier)
 Doesn't actually delete object (pointed to by pointer) only clears entry from the map.
 
void get_object_ids (std::vector< int > &_ids)
 

Private Member Functions

 ObjectIDPointerManagerT (const ObjectIDPointerManagerT &_rhs)
 Copy constructor (not used)
 
ObjectIDPointerManagerToperator= (const ObjectIDPointerManagerT &_rhs)
 Assignment operator (not used)
 

Private Attributes

PointerObjectIDMap pointer_objectID_map_
 mapping
 

Detailed Description

template<class Pointer>
class ObjectIDPointerManagerT< Pointer >

Use this class to manage pointers associated with an object in the framework.

Definition at line 94 of file ObjectIDPointerManagerT.hh.

Member Function Documentation

template<class Pointer >
bool ObjectIDPointerManagerT< Pointer >::add_pointer ( int  _identifier,
const Pointer &  _pointer 
)

Add a pointer to the map

Parameters
_identifieridentifier of corresponding object
_pointerpointer to be added

Definition at line 99 of file ObjectIDPointerManagerT.cc.

template<class Pointer >
bool ObjectIDPointerManagerT< Pointer >::get_pointer ( int  _identifier,
Pointer &  _pointer 
)

try to get a pointer with the given id

Parameters
_identifieridentifier of corresponding object
_pointerThe returned pointer
Returns
true if object exists

Definition at line 70 of file ObjectIDPointerManagerT.cc.

template<class Pointer >
Pointer ObjectIDPointerManagerT< Pointer >::get_pointer ( int  _identifier)

try to get a pointer with the given id

Parameters
_identifieridentifier of corresponding object
Returns
returns either a pointer or if the id does not exist NULL

Definition at line 88 of file ObjectIDPointerManagerT.cc.


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