CHROMA
Public Member Functions | Private Types | Private Attributes | List of all members
Chroma::NamedObjectMap Class Reference

The Map Itself. More...

#include <named_obj.h>

Public Member Functions

 NamedObjectMap ()
 
 ~NamedObjectMap ()
 
template<typename T >
void create (const std::string &id)
 Create an entry of arbitrary type. More...
 
template<typename T , typename P1 >
void create (const std::string &id, const P1 &p1)
 Create an entry of arbitrary type, with 1 parameter. More...
 
bool check (const std::string &id) const
 Check if an id exists. More...
 
void erase (const std::string &id)
 Delete an item that we no longer neeed. More...
 
void dump () const
 Dump out all objects. More...
 
NamedObjectBaseget (const std::string &id) const
 Look something up and return a NamedObjectBase reference. More...
 
template<typename T >
TgetObj (const std::string &id)
 Look something up and return a ref to the derived named object. More...
 
template<typename T >
const TgetObj (const std::string &id) const
 Look something up and return a ref to the derived named object. More...
 
template<typename T >
TgetData (const std::string &id)
 Look something up and return a ref to actual data. More...
 
template<typename T >
const TgetData (const std::string &id) const
 Look something up and return a ref to actual data. More...
 

Private Types

typedef std::map< std::string, NamedObjectBase * > MapType_t
 

Private Attributes

MapType_t the_map
 

Detailed Description

The Map Itself.

Definition at line 153 of file named_obj.h.

Member Typedef Documentation

◆ MapType_t

typedef std::map<std::string, NamedObjectBase*> Chroma::NamedObjectMap::MapType_t
private

Definition at line 323 of file named_obj.h.

Constructor & Destructor Documentation

◆ NamedObjectMap()

Chroma::NamedObjectMap::NamedObjectMap ( )
inline

Definition at line 157 of file named_obj.h.

References the_map.

◆ ~NamedObjectMap()

Chroma::NamedObjectMap::~NamedObjectMap ( )
inline

Definition at line 162 of file named_obj.h.

References the_map.

Member Function Documentation

◆ check()

bool Chroma::NamedObjectMap::check ( const std::string &  id) const
inline

Check if an id exists.

Definition at line 231 of file named_obj.h.

References the_map.

◆ create() [1/2]

template<typename T >
void Chroma::NamedObjectMap::create ( const std::string &  id)
inline

Create an entry of arbitrary type.

Definition at line 178 of file named_obj.h.

References the_map.

◆ create() [2/2]

template<typename T , typename P1 >
void Chroma::NamedObjectMap::create ( const std::string &  id,
const P1 &  p1 
)
inline

Create an entry of arbitrary type, with 1 parameter.

Definition at line 205 of file named_obj.h.

References the_map.

◆ dump()

void Chroma::NamedObjectMap::dump ( ) const
inline

Dump out all objects.

Definition at line 267 of file named_obj.h.

References j, and the_map.

◆ erase()

void Chroma::NamedObjectMap::erase ( const std::string &  id)
inline

Delete an item that we no longer neeed.

Definition at line 242 of file named_obj.h.

References the_map.

◆ get()

NamedObjectBase& Chroma::NamedObjectMap::get ( const std::string &  id) const
inline

Look something up and return a NamedObjectBase reference.

Definition at line 276 of file named_obj.h.

References the_map.

Referenced by getData(), and getObj().

◆ getData() [1/2]

template<typename T >
T& Chroma::NamedObjectMap::getData ( const std::string &  id)
inline

Look something up and return a ref to actual data.

Definition at line 310 of file named_obj.h.

References get().

Referenced by getData().

◆ getData() [2/2]

template<typename T >
const T& Chroma::NamedObjectMap::getData ( const std::string &  id) const
inline

Look something up and return a ref to actual data.

Definition at line 317 of file named_obj.h.

References get(), and getData().

◆ getObj() [1/2]

template<typename T >
T& Chroma::NamedObjectMap::getObj ( const std::string &  id)
inline

Look something up and return a ref to the derived named object.

Definition at line 296 of file named_obj.h.

References get().

◆ getObj() [2/2]

template<typename T >
const T& Chroma::NamedObjectMap::getObj ( const std::string &  id) const
inline

Look something up and return a ref to the derived named object.

Definition at line 303 of file named_obj.h.

References get().

Member Data Documentation

◆ the_map

MapType_t Chroma::NamedObjectMap::the_map
private

Definition at line 324 of file named_obj.h.

Referenced by check(), create(), dump(), erase(), get(), NamedObjectMap(), and ~NamedObjectMap().


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