Gaudi Framework, version v23r0 |
Home | Generated: Mon Jan 30 2012 |
template <class FROM, class TO, class MAPENTRY> class RefTable More...
#include <RefTable.h>
Public Types | |
typedef FROM | KeyType |
typedef MAPENTRY | EntryType |
typedef RefTableBase< FROM, EntryType > | BaseType |
typedef GaudiUtils::HashMap < const void *, EntryType > | TableType |
Define Reference map. | |
typedef TableType::iterator | iterator |
Definition of map iterator. | |
typedef TableType::const_iterator | const_iterator |
Definition of map iterator (CONST) | |
Public Member Functions | |
RefTableBase (const CLID &clid, int len) | |
Constructors. | |
virtual | ~RefTableBase () |
Destructor. | |
virtual void | clear () |
Clear Reference map. | |
iterator | begin () |
Start of direct access iterator. | |
const_iterator | begin () const |
Start of direct access iterator (CONST) | |
iterator | end () |
End of direct access iterator. | |
const_iterator | end () const |
End of direct access iterator (CONST) | |
long | size () const |
Size of References. | |
void | reserve (int len) |
Size of References. | |
virtual StreamBuffer & | serialize (StreamBuffer &s) const |
Serialize the object for writing. | |
virtual StreamBuffer & | serialize (StreamBuffer &s) |
Serialize the object for reading. | |
Public Attributes | |
CLID | m_clid |
Class id of the reference table. | |
Protected Member Functions | |
bool | insertMapElement (const KeyType *from, EntryType &to) |
Insert new Entry into Reference container. | |
EntryType * | i_reference (const KeyType *from) |
Find Reference from it's source entry. | |
const EntryType * | i_reference (const KeyType *from) const |
Find Reference from it's source entry (CONST) | |
Private Attributes | |
TableType | m_table |
Reference map. | |
SmartRef< KeyType > | m_fromRef |
This is a completely useless entry, but the compiler wants it to be instantiated before the serialize function is defined. |
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 46 of file RefTable.h.
typedef RefTableBase<FROM, EntryType> RefTableBase< FROM, MAPENTRY >::BaseType |
Definition at line 53 of file RefTable.h.
typedef TableType::const_iterator RefTableBase< FROM, MAPENTRY >::const_iterator |
Definition of map iterator (CONST)
Definition at line 61 of file RefTable.h.
typedef MAPENTRY RefTableBase< FROM, MAPENTRY >::EntryType |
Definition at line 51 of file RefTable.h.
typedef TableType::iterator RefTableBase< FROM, MAPENTRY >::iterator |
Definition of map iterator.
Definition at line 59 of file RefTable.h.
typedef FROM RefTableBase< FROM, MAPENTRY >::KeyType |
Definition at line 49 of file RefTable.h.
typedef GaudiUtils::HashMap< 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 57 of file RefTable.h.
RefTableBase< FROM, MAPENTRY >::RefTableBase | ( | const CLID & | clid, |
int | len | ||
) | [inline] |
virtual RefTableBase< FROM, MAPENTRY >::~RefTableBase | ( | ) | [inline, virtual] |
iterator RefTableBase< FROM, MAPENTRY >::begin | ( | void | ) | [inline] |
Start of direct access iterator.
Definition at line 108 of file RefTable.h.
const_iterator RefTableBase< FROM, MAPENTRY >::begin | ( | void | ) | const [inline] |
Start of direct access iterator (CONST)
Definition at line 112 of file RefTable.h.
virtual void RefTableBase< FROM, MAPENTRY >::clear | ( | void | ) | [inline, virtual] |
const_iterator RefTableBase< FROM, MAPENTRY >::end | ( | void | ) | const [inline] |
End of direct access iterator (CONST)
Definition at line 120 of file RefTable.h.
iterator RefTableBase< FROM, MAPENTRY >::end | ( | void | ) | [inline] |
EntryType* RefTableBase< FROM, MAPENTRY >::i_reference | ( | const KeyType * | from ) | [inline, protected] |
const EntryType* RefTableBase< FROM, MAPENTRY >::i_reference | ( | const KeyType * | from ) | const [inline, protected] |
Find Reference from it's source entry (CONST)
Definition at line 87 of file RefTable.h.
bool RefTableBase< FROM, MAPENTRY >::insertMapElement | ( | const KeyType * | from, |
EntryType & | to | ||
) | [inline, protected] |
Insert new Entry into Reference container.
Definition at line 75 of file RefTable.h.
void RefTableBase< FROM, MAPENTRY >::reserve | ( | int | len ) | [inline] |
virtual StreamBuffer& RefTableBase< FROM, MAPENTRY >::serialize | ( | StreamBuffer & | s ) | const [inline, virtual] |
Serialize the object for writing.
Definition at line 132 of file RefTable.h.
{ DataObject::serialize(s) << m_table.size(); //for (TableType::const_iterator i = m_table.begin(), stop = m_table.end(); i != stop; i++ ) { // SmartRef<KeyType> fromRef; // fromRef = (KeyType*)(*i).first; // s << fromRef(this); // s << (*i).second(this); //} return s; }
virtual StreamBuffer& RefTableBase< FROM, MAPENTRY >::serialize | ( | StreamBuffer & | s ) | [inline, virtual] |
Serialize the object for reading.
Definition at line 143 of file RefTable.h.
{ long siz; DataObject::serialize(s) >> siz; m_table.reserve(siz); //for ( long i = 0; i < siz; i++ ) { // SmartRef<KeyType> fromRef; // EntryType entry; // s >> fromRef(this); // s >> entry(this); // insertMapElement( fromRef, entry); //} return s; }
long RefTableBase< FROM, MAPENTRY >::size | ( | void | ) | const [inline] |
CLID RefTableBase< FROM, MAPENTRY >::m_clid |
Class id of the reference table.
Definition at line 63 of file RefTable.h.
SmartRef<KeyType> RefTableBase< FROM, MAPENTRY >::m_fromRef [private] |
This is a completely useless entry, but the compiler wants it to be instantiated before the serialize function is defined.
Definition at line 71 of file RefTable.h.
TableType RefTableBase< FROM, MAPENTRY >::m_table [private] |
Reference map.
Definition at line 66 of file RefTable.h.