EDoc::SpecificIndexedObject< T > Class Template Reference

#include <libs/EDoc/IndexedDictionary.h>

Inheritance diagram for EDoc::SpecificIndexedObject< T >:

EDoc::IndexedObject

Detailed Description

template<typename T>
class EDoc::SpecificIndexedObject< T >

Specific varient of IndexedObject for a particular StringIdentifiedObject derivation type like, File, Function etc.

Definition at line 145 of file IndexedDictionary.h.

Public Member Functions

 SpecificIndexedObject (Dictionary &dict_in)
 Create an instance for a specific dictionary.
virtual StringIdentifiedObjectNew (Dictionary &dict, uint32_t index)
 Create a new instance of the type with the given index as an identifier.
T * Get (uint32_t index)
 Type specific implementation of IndexedObject::CGet().
T * AlwaysGet (uint32_t index)
 Type specific implementation of IndexedObject::AlwaysGet().
StringIdentifiedObjectCGet (uint32_t index)
 Obtain the instance for the given index or return NULL if one does not exist.
void CAdd (uint32_t index, StringIdentifiedObject *item)
 Adds an existing StringIdentifiedObject instance to this map.
StringIdentifiedObjectCAlwaysGet (uint32_t index)
 Obtain the instance for the given index or create one if one does not exist.

Data Fields

Dictionarydict
 Reference to the dictionary object that all instances belong.
std::vector< StringIdentifiedObject * > items
 List of items that currently exist.


Constructor & Destructor Documentation

template<typename T>
EDoc::SpecificIndexedObject< T >::SpecificIndexedObject ( Dictionary dict_in  )  [inline]

Create an instance for a specific dictionary.

Definition at line 152 of file IndexedDictionary.h.


Member Function Documentation

template<typename T>
virtual StringIdentifiedObject* EDoc::SpecificIndexedObject< T >::New ( Dictionary dict,
uint32_t  index 
) [inline, virtual]

Create a new instance of the type with the given index as an identifier.

Implements EDoc::IndexedObject.

Definition at line 161 of file IndexedDictionary.h.

template<typename T>
T* EDoc::SpecificIndexedObject< T >::Get ( uint32_t  index  )  [inline]

Type specific implementation of IndexedObject::CGet().

Definition at line 171 of file IndexedDictionary.h.

template<typename T>
T* EDoc::SpecificIndexedObject< T >::AlwaysGet ( uint32_t  index  )  [inline]

Type specific implementation of IndexedObject::AlwaysGet().

Definition at line 179 of file IndexedDictionary.h.

EDoc::IndexedObject::CGet ( uint32_t  index  )  [inline, inherited]

Obtain the instance for the given index or return NULL if one does not exist.

Note:
EDoc++ data included.

Definition at line 71 of file IndexedDictionary.h.

References EDoc::IndexedObject::items.

Referenced by EDoc::IndexedObject::CAlwaysGet(), and EDoc::SpecificIndexedObject< EDoc::Type >::Get().

EDoc::IndexedObject::CAdd ( uint32_t  index,
EDoc::StringIdentifiedObject item 
) [inline, inherited]

Adds an existing StringIdentifiedObject instance to this map.

Should not be called ore than once for a single index.

Definition at line 88 of file IndexedDictionary.h.

References EDOC_THROW_EXCEPTION, EDoc::StringIdentifiedObject::index, and EDoc::IndexedObject::items.

Referenced by EDoc::IndexedObject::CAlwaysGet().

EDoc::IndexedObject::CAlwaysGet ( uint32_t  index  )  [inline, inherited]

Obtain the instance for the given index or create one if one does not exist.

Note:
EDoc++ data included.
Exceptions:
EDoc::FileIOException 

Definition at line 110 of file IndexedDictionary.h.

References EDoc::IndexedObject::CAdd(), EDoc::IndexedObject::CGet(), EDoc::IndexedObject::dict, and EDoc::IndexedObject::New().

Referenced by EDoc::SpecificIndexedObject< EDoc::Type >::AlwaysGet().


Field Documentation

Dictionary& EDoc::IndexedObject::dict [inherited]

Reference to the dictionary object that all instances belong.

Definition at line 131 of file IndexedDictionary.h.

Referenced by EDoc::IndexedObject::CAlwaysGet(), and EDoc::SpecificIndexedObject< EDoc::Type >::New().

std::vector<StringIdentifiedObject*> EDoc::IndexedObject::items [inherited]

List of items that currently exist.

Definition at line 137 of file IndexedDictionary.h.

Referenced by EDoc::IndexedObject::CAdd(), and EDoc::IndexedObject::CGet().


The documentation for this class was generated from the following file:
Generated on Tue Jan 20 18:26:10 2009 for EDoc-0.2.1 by  doxygen 1.5.1