EDoc::IndexedObject Class Reference

#include <libs/EDoc/IndexedDictionary.h>

Inheritance diagram for EDoc::IndexedObject:

EDoc::SpecificIndexedObject< T >

Detailed Description

Stores a map of StringIdentifiedObject's that are indexed by an integer value.

This is designed to be used for the process of loading EDoc++ data items from a file. In the EDoc++ data format all items are identified by a integer instead of a string to reduce the size of the resulting data file.

Definition at line 50 of file IndexedDictionary.h.

Public Member Functions

 IndexedObject (Dictionary &dict_in)
 Create an instance to manage loading for the given dictionary.
virtual ~IndexedObject ()
 Destructor.
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.
virtual StringIdentifiedObjectNew (Dictionary &dict, uint32_t index)=0
 Implemented in child to create instance of specific derivation from StringIdentifiedObject.

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

EDoc::IndexedObject::IndexedObject ( EDoc::Dictionary dict_in  )  [inline]

Create an instance to manage loading for the given dictionary.

Note:
EDoc++ data included.

Definition at line 57 of file IndexedDictionary.h.

EDoc::IndexedObject::~IndexedObject (  )  [inline, virtual]

Destructor.

Note:
EDoc++ data included.

Definition at line 65 of file IndexedDictionary.h.


Member Function Documentation

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

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 items.

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

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

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 items.

Referenced by CAlwaysGet().

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

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 CAdd(), CGet(), dict, and New().

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

EDoc::IndexedObject::New ( Dictionary dict,
uint32_t  index 
) [pure virtual]

Implemented in child to create instance of specific derivation from StringIdentifiedObject.

Implemented in EDoc::SpecificIndexedObject< T >, EDoc::SpecificIndexedObject< EDoc::File >, EDoc::SpecificIndexedObject< EDoc::FunctionType >, EDoc::SpecificIndexedObject< EDoc::Function >, and EDoc::SpecificIndexedObject< EDoc::Type >.

Referenced by CAlwaysGet().


Field Documentation

Dictionary& EDoc::IndexedObject::dict

Reference to the dictionary object that all instances belong.

Definition at line 131 of file IndexedDictionary.h.

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

std::vector<StringIdentifiedObject*> EDoc::IndexedObject::items

List of items that currently exist.

Definition at line 137 of file IndexedDictionary.h.

Referenced by CAdd(), and CGet().


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