Developer Documentation
ObjectIDPointerManagerT< Pointer > Class Template Reference

#include <OpenFlipper/common/ObjectIDPointerManagerT.hh>

Public Types

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

Public Member Functions

 ObjectIDPointerManagerT ()
 Constructor. More...
 
 ~ObjectIDPointerManagerT ()
 Destructor. More...
 
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. More...
 
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 More...
 

Detailed Description

template<class Pointer>
class ObjectIDPointerManagerT< Pointer >

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

Definition at line 68 of file ObjectIDPointerManagerT.hh.

Member Typedef Documentation

◆ PointerObjectIDMap

template<class Pointer >
typedef std::map< int, Pointer > ObjectIDPointerManagerT< Pointer >::PointerObjectIDMap

typedef for the idmap

Definition at line 74 of file ObjectIDPointerManagerT.hh.

◆ PointerObjectIDPair

template<class Pointer >
typedef std::pair< int, Pointer > ObjectIDPointerManagerT< Pointer >::PointerObjectIDPair

typedef for the pairs

Definition at line 77 of file ObjectIDPointerManagerT.hh.

Constructor & Destructor Documentation

◆ ObjectIDPointerManagerT()

template<class Pointer >
ObjectIDPointerManagerT< Pointer >::ObjectIDPointerManagerT ( )
inline

Constructor.

Definition at line 80 of file ObjectIDPointerManagerT.hh.

◆ ~ObjectIDPointerManagerT()

template<class Pointer >
ObjectIDPointerManagerT< Pointer >::~ObjectIDPointerManagerT ( )
inline

Destructor.

Definition at line 83 of file ObjectIDPointerManagerT.hh.

Member Function Documentation

◆ add_pointer()

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 89 of file ObjectIDPointerManagerT_impl.hh.

◆ delete_object()

template<class Pointer >
bool ObjectIDPointerManagerT< Pointer >::delete_object ( int  _identifier)

Doesn't actually delete object (pointed to by pointer) only clears entry from the map.

Definition at line 106 of file ObjectIDPointerManagerT_impl.hh.

◆ get_object_ids()

template<class Pointer >
void ObjectIDPointerManagerT< Pointer >::get_object_ids ( std::vector< int > &  _ids)

Definition at line 123 of file ObjectIDPointerManagerT_impl.hh.

◆ get_pointer() [1/2]

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 78 of file ObjectIDPointerManagerT_impl.hh.

◆ get_pointer() [2/2]

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 60 of file ObjectIDPointerManagerT_impl.hh.

Member Data Documentation

◆ pointer_objectID_map_

template<class Pointer >
PointerObjectIDMap ObjectIDPointerManagerT< Pointer >::pointer_objectID_map_
private

mapping

Definition at line 118 of file ObjectIDPointerManagerT.hh.


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