Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

RefTableBase Class Template Reference

template <class FROM, class TO, class MAPENTRY> class RefTable. More...

#include <RefTable.h>

Inheritance diagram for RefTableBase:

DataObject RefTable1to1 RefTable1toN List of all members.

Public Types

typedef FROM KeyType
typedef MAPENTRY EntryType
typedef RefTableBase<FROM,
EntryType
BaseType
typedef HashTable< const void* ,
EntryType
TableType
 Define Reference map. More...

typedef TableType::iterator iterator
 Definition of map iterator. More...

typedef TableType::const_iterator const_iterator
 Definition of map iterator (CONST). More...


Public Methods

 RefTableBase (const CLID& clid, int len)
 Constructors. More...

virtual ~RefTableBase ()
 Destructor. More...

virtual void clear ()
 Clear Reference map. More...

iterator begin ()
 Start of direct access iterator. More...

const_iterator begin () const
 Start of direct access iterator (CONST). More...

iterator end ()
 End of direct access iterator. More...

const_iterator end () const
 End of direct access iterator (CONST). More...

long size () const
 Size of References. More...

void reserve (int len)
 Size of References. More...

virtual StreamBuffer& serialize ( StreamBuffer& s ) const
 Serialize the object for writing. More...

virtual StreamBuffer& serialize ( StreamBuffer& s )
 Serialize the object for reading. More...


Public Attributes

CLID m_clid
 Class id of the reference table. More...


Protected Methods

bool insertMapElement ( const FROM* from, EntryType& to )
 Insert new Entry into Reference container. More...

EntryTypei_reference (const FROM* from)
 Find Reference from it's source entry. More...

const EntryTypei_reference (const FROM* from) const
 Find Reference from it's source entry (CONST). More...


Private Attributes

TableType m_table
 Reference map. More...


Detailed Description

template<class FROM, class MAPENTRY> template class RefTableBase

template <class FROM, class TO, class MAPENTRY> class RefTable.

ClassName: RefTableBase

Description: Essential information of the RefTable References can be of several kinds: multiplicity: FROM TO 1 0 = 1 (no existing Reference) 1 1 <-> 1 relationship n 1 <-> n relationship Template parameters: FROM type of the source object TO type of the referenced object(s) MAPENTRY entry type used for the referenced objects within the map.

Author: Markus Frank

Definition at line 47 of file RefTable.h.


Member Typedef Documentation

template<classFROM, classMAPENTRY>
typedef RefTableBase<FROM, EntryType> RefTableBase<FROM, MAPENTRY>::BaseType
 

Definition at line 54 of file RefTable.h.

template<classFROM, classMAPENTRY>
typedef MAPENTRY RefTableBase<FROM, MAPENTRY>::EntryType
 

Definition at line 52 of file RefTable.h.

Referenced by RefTable1toN::insert(), and RefTable1to1::insert().

template<classFROM, classMAPENTRY>
typedef FROM RefTableBase<FROM, MAPENTRY>::KeyType
 

Definition at line 50 of file RefTable.h.

template<classFROM, classMAPENTRY>
typedef HashTable< const void* , EntryType > RefTableBase<FROM, MAPENTRY>::TableType
 

Define Reference map.

Need to use index into vector, because location of vector entries is not fixed

Definition at line 58 of file RefTable.h.

template<classFROM, classMAPENTRY>
typedef TableType::const_iterator RefTableBase<FROM, MAPENTRY>::const_iterator
 

Definition of map iterator (CONST).

Definition at line 68 of file RefTable.h.

template<classFROM, classMAPENTRY>
typedef TableType::iterator RefTableBase<FROM, MAPENTRY>::iterator
 

Definition of map iterator.

Definition at line 66 of file RefTable.h.


Constructor & Destructor Documentation

template<classFROM, classMAPENTRY>
RefTableBase<FROM, MAPENTRY>::RefTableBase<FROM, MAPENTRY> ( const CLID & clid,
int len ) [inline]
 

Constructors.

Definition at line 99 of file RefTable.h.

template<classFROM, classMAPENTRY>
RefTableBase<FROM, MAPENTRY>::~RefTableBase<FROM, MAPENTRY> ( ) [inline, virtual]
 

Destructor.

Definition at line 102 of file RefTable.h.


Member Function Documentation

template<classFROM, classMAPENTRY>
const_iterator RefTableBase<FROM, MAPENTRY>::begin ( ) const [inline]
 

Start of direct access iterator (CONST).

Definition at line 114 of file RefTable.h.

template<classFROM, classMAPENTRY>
iterator RefTableBase<FROM, MAPENTRY>::begin ( ) [inline]
 

Start of direct access iterator.

Definition at line 110 of file RefTable.h.

template<classFROM, classMAPENTRY>
void RefTableBase<FROM, MAPENTRY>::clear ( ) [inline, virtual]
 

Clear Reference map.

Definition at line 106 of file RefTable.h.

Referenced by ~RefTableBase().

template<classFROM, classMAPENTRY>
const_iterator RefTableBase<FROM, MAPENTRY>::end ( ) const [inline]
 

End of direct access iterator (CONST).

Definition at line 122 of file RefTable.h.

template<classFROM, classMAPENTRY>
iterator RefTableBase<FROM, MAPENTRY>::end ( ) [inline]
 

End of direct access iterator.

Definition at line 118 of file RefTable.h.

template<classFROM, classMAPENTRY>
const EntryType * RefTableBase<FROM, MAPENTRY>::i_reference ( const FROM * from ) const [inline, protected]
 

Find Reference from it's source entry (CONST).

Definition at line 89 of file RefTable.h.

template<classFROM, classMAPENTRY>
EntryType * RefTableBase<FROM, MAPENTRY>::i_reference ( const FROM * from ) [inline, protected]
 

Find Reference from it's source entry.

Definition at line 81 of file RefTable.h.

Referenced by RefTable1toN::insert(), RefTable1toN::isReferenced(), RefTable1to1::isReferenced(), RefTable1toN::reference(), and RefTable1to1::reference().

template<classFROM, classMAPENTRY>
bool RefTableBase<FROM, MAPENTRY>::insertMapElement ( const FROM * from,
EntryType & to ) [inline, protected]
 

Insert new Entry into Reference container.

Definition at line 77 of file RefTable.h.

Referenced by RefTable1toN::insert(), RefTable1to1::insert(), and serialize().

template<classFROM, classMAPENTRY>
void RefTableBase<FROM, MAPENTRY>::reserve ( int len ) [inline]
 

Size of References.

Definition at line 130 of file RefTable.h.

template<classFROM, classMAPENTRY>
StreamBuffer & RefTableBase<FROM, MAPENTRY>::serialize ( StreamBuffer & s ) [inline, virtual]
 

Serialize the object for reading.

Definition at line 142 of file RefTable.h.

template<classFROM, classMAPENTRY>
StreamBuffer & RefTableBase<FROM, MAPENTRY>::serialize ( StreamBuffer & s ) const [inline, virtual]
 

Serialize the object for writing.

Definition at line 134 of file RefTable.h.

template<classFROM, classMAPENTRY>
long RefTableBase<FROM, MAPENTRY>::size ( ) const [inline]
 

Size of References.

Definition at line 126 of file RefTable.h.


Member Data Documentation

template<classFROM, classMAPENTRY>
CLID RefTableBase<FROM, MAPENTRY>::m_clid
 

Class id of the reference table.

Definition at line 71 of file RefTable.h.

template<classFROM, classMAPENTRY>
TableType RefTableBase<FROM, MAPENTRY>::m_table [private]
 

Reference map.

Definition at line 74 of file RefTable.h.


The documentation for this class was generated from the following file:
Generated at Wed Nov 21 12:22:54 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000