| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes | List of all members
RefTableBase< FROM, MAPENTRY > Class Template Reference

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

`#include <GaudiKernel/RefTable.h>`

Inheritance diagram for RefTableBase< FROM, MAPENTRY >:
[legend]
Collaboration diagram for RefTableBase< FROM, MAPENTRY >:
[legend]

## Public Types
typedef FROM | KeyType
typedef MAPENTRY | EntryType
typedef RefTableBase< FROM, EntryType > | BaseType
typedef GaudiUtils::HashMap< 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 Member Functions
| RefTableBase (const CLID &clid, int len)
| Constructors. More...
virtual | ~RefTableBase ()=default
| 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 Member Functions inherited from DataObject
| DataObject ()
| Standard Constructor. More...
| DataObject (const DataObject &rhs)
| Copy Constructor. More...
DataObject & | operator= (const DataObject &rhs)
| Assignment Operator. More...
| DataObject (DataObject &&rhs)
| Move Constructor. More...
DataObject & | operator= (DataObject &&rhs)
| Move Assignment Operator. More...
virtual | ~DataObject ()
| Standard Destructor. More...
virtual unsigned long | addRef ()
| Add reference to object. More...
virtual unsigned long | release ()
| release reference to object More...
virtual const CLID & | clID () const
| Retrieve reference to class definition structure. More...
const std::string & | name () const
| Retreive DataObject name. It is the name when registered in the store. More...
virtual StatusCode | update ()
| Provide empty placeholder for internal object reconfiguration callback. More...
void | setRegistry (IRegistry *pRegistry)
| Set pointer to Registry. More...
IRegistry * | registry () const
| Get pointer to Registry. More...
LinkManager * | linkMgr () const
| Retrieve Link manager. More...
unsigned char | version () const
| Retrieve version number of this object representation. More...
void | setVersion (unsigned char vsn)
| Set version number of this object representation. More...
unsigned long | refCount () const
| Return the refcount. More...
virtual std::ostream & | fillStream (std::ostream &s) const
| Fill the output stream (ASCII) More...

## Public Attributes
CLID | m_clid
| Class id of the reference table. More...

## Protected Member Functions
bool | insertMapElement (const KeyType *from, EntryType &to)
| Insert new Entry into Reference container. More...
EntryType * | i_reference (const KeyType *from)
| Find Reference from it's source entry. More...
const EntryType * | i_reference (const KeyType *from) const
| Find Reference from it's source entry (CONST) More...

## Private Attributes
TableType | m_table
| Reference map. More...
SmartRef< KeyType > | m_fromRef
| This is a completely useless entry, but the compiler wants it to be instantiated before the serialize function is defined. More...

## Additional Inherited Members
Static Public Member Functions inherited from DataObject
static const CLID & | classID ()
| Retrieve reference to class definition structure (static access) More...

## Detailed Description

### template<class FROM, class MAPENTRY>
class RefTableBase< FROM, MAPENTRY >

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 44 of file RefTable.h.

## Member Typedef Documentation

template<class FROM, class MAPENTRY>

typedef RefTableBase<FROM, EntryType> RefTableBase< FROM, MAPENTRY >::BaseType

Definition at line 52 of file RefTable.h.

template<class FROM, class MAPENTRY>

typedef TableType::const_iterator RefTableBase< FROM, MAPENTRY >::const_iterator

Definition of map iterator (CONST)

Definition at line 60 of file RefTable.h.

template<class FROM, class MAPENTRY>

typedef MAPENTRY RefTableBase< FROM, MAPENTRY >::EntryType

Definition at line 50 of file RefTable.h.

template<class FROM, class MAPENTRY>

typedef TableType::iterator RefTableBase< FROM, MAPENTRY >::iterator

Definition of map iterator.

Definition at line 58 of file RefTable.h.

template<class FROM, class MAPENTRY>

typedef FROM RefTableBase< FROM, MAPENTRY >::KeyType

Definition at line 48 of file RefTable.h.

template<class FROM, class MAPENTRY>

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 56 of file RefTable.h.

## Constructor & Destructor Documentation

template<class FROM, class MAPENTRY>

RefTableBase< FROM, MAPENTRY >::RefTableBase | ( | const CLID & | clid,
|  | int | len
| ) |  |
| inline

Constructors.

Definition at line 91 of file RefTable.h.

91 : m_clid( clid ), m_table( len ) {}
RefTableBase::m_clid
CLID m_clid
Class id of the reference table.
Definition: RefTable.h:62
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
template<class FROM, class MAPENTRY>

virtual RefTableBase< FROM, MAPENTRY >::~RefTableBase | ( |  | ) |
| virtual default

Destructor.

## Member Function Documentation

template<class FROM, class MAPENTRY>

iterator RefTableBase< FROM, MAPENTRY >::begin | ( |  | ) |
| inline

Start of direct access iterator.

Definition at line 97 of file RefTable.h.

97 { return m_table.begin(); }
GaudiUtils::Map::begin
iterator begin()
Definition: Map.h:133
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
template<class FROM, class MAPENTRY>

const_iterator RefTableBase< FROM, MAPENTRY >::begin | ( |  | ) | const
| inline

Start of direct access iterator (CONST)

Definition at line 99 of file RefTable.h.

99 { return m_table.begin(); }
GaudiUtils::Map::begin
iterator begin()
Definition: Map.h:133
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
template<class FROM, class MAPENTRY>

virtual void RefTableBase< FROM, MAPENTRY >::clear | ( |  | ) |
| inline virtual

Clear Reference map.

Definition at line 95 of file RefTable.h.

95 { m_table.clear(); }
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
GaudiUtils::Map::clear
void clear()
Definition: Map.h:195
template<class FROM, class MAPENTRY>

iterator RefTableBase< FROM, MAPENTRY >::end | ( |  | ) |
| inline

End of direct access iterator.

Definition at line 101 of file RefTable.h.

101 { return m_table.end(); }
GaudiUtils::Map::end
iterator end()
Definition: Map.h:134
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
template<class FROM, class MAPENTRY>

const_iterator RefTableBase< FROM, MAPENTRY >::end | ( |  | ) | const
| inline

End of direct access iterator (CONST)

Definition at line 103 of file RefTable.h.

103 { return m_table.end(); }
GaudiUtils::Map::end
iterator end()
Definition: Map.h:134
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
template<class FROM, class MAPENTRY>

EntryType* RefTableBase< FROM, MAPENTRY >::i_reference | ( | const KeyType * | from | ) |
| inline protected

Find Reference from it's source entry.

Definition at line 77 of file RefTable.h.

78 {
79 auto i = m_table.find( from );
80 return i != 0 ? &( i->second ) : nullptr;
81 }
GaudiUtils::Map::find
iterator find(const key_type &key)
Definition: Map.h:151
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
template<class FROM, class MAPENTRY>

const EntryType* RefTableBase< FROM, MAPENTRY >::i_reference | ( | const KeyType * | from | ) | const
| inline protected

Find Reference from it's source entry (CONST)

Definition at line 83 of file RefTable.h.

84 {
85 auto i = m_table.find( from );
86 return i != m_table.end() ? &( i->second ) : nullptr;
87 }
GaudiUtils::Map::end
iterator end()
Definition: Map.h:134
GaudiUtils::Map::find
iterator find(const key_type &key)
Definition: Map.h:151
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
template<class FROM, class MAPENTRY>

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.

75 { return m_table.insert( from, to ); }
GaudiUtils::Map::insert
std::pair< iterator, bool > insert(ValueType &&val)
Definition: Map.h:174
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
template<class FROM, class MAPENTRY>

void RefTableBase< FROM, MAPENTRY >::reserve | ( | int | len | ) |
| inline

Size of References.

Definition at line 107 of file RefTable.h.

107 { m_table.reserve( len ); }
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
template<class FROM, class MAPENTRY>

virtual StreamBuffer& RefTableBase< FROM, MAPENTRY >::serialize | ( | StreamBuffer & | s | ) | const
| inline virtual

Serialize the object for writing.

Definition at line 109 of file RefTable.h.

110 {
111 DataObject::serialize( s ) << m_table.size();
112 // for (TableType::const_iterator i = m_table.begin(), stop = m_table.end(); i != stop; i++ ) {
113 // SmartRef<KeyType> fromRef;
114 // fromRef = (KeyType*)(*i).first;
115 // s << fromRef(this);
116 // s << (*i).second(this);
117 //}
118 return s;
119 }
GaudiUtils::Map::size
size_type size() const
Definition: Map.h:199
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
gaudirun.s
string s
Definition: gaudirun.py:253
template<class FROM, class MAPENTRY>

virtual StreamBuffer& RefTableBase< FROM, MAPENTRY >::serialize | ( | StreamBuffer & | s | ) |
| inline virtual

Serialize the object for reading.

Definition at line 121 of file RefTable.h.

122 {
123 long siz;
124 DataObject::serialize( s ) >> siz;
125 m_table.reserve( siz );
126 // for ( long i = 0; i < siz; i++ ) {
127 // SmartRef<KeyType> fromRef;
128 // EntryType entry;
129 // s >> fromRef(this);
130 // s >> entry(this);
131 // insertMapElement( fromRef, entry);
132 //}
133 return s;
134 }
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66
gaudirun.s
string s
Definition: gaudirun.py:253
template<class FROM, class MAPENTRY>

long RefTableBase< FROM, MAPENTRY >::size | ( |  | ) | const
| inline

Size of References.

Definition at line 105 of file RefTable.h.

105 { return m_table.size(); }
GaudiUtils::Map::size
size_type size() const
Definition: Map.h:199
RefTableBase::m_table
TableType m_table
Reference map.
Definition: RefTable.h:66

## Member Data Documentation

template<class FROM, class MAPENTRY>

CLID RefTableBase< FROM, MAPENTRY >::m_clid

Class id of the reference table.

Definition at line 62 of file RefTable.h.

template<class FROM, class MAPENTRY>

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.

template<class FROM, class MAPENTRY>

TableType RefTableBase< FROM, MAPENTRY >::m_table
| private

Reference map.

Definition at line 66 of file RefTable.h.

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

- GaudiKernel/GaudiKernel/RefTable.h