| The Gaudi Framework v30r0 (c919700c)

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

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

Public Member Functions | List of all members
RefTable1toN< FROM, TO > Class Template Reference

`#include <GaudiKernel/RefTable.h>`

Inheritance diagram for RefTable1toN< FROM, TO >:
[legend]
Collaboration diagram for RefTable1toN< FROM, TO >:
[legend]

## Public Member Functions
| RefTable1toN (const CLID &clid, int len=16)
| Standard Constructor. More...
| ~RefTable1toN () override=default
| Standard Destructor. More...
virtual const CLID & | clID () const
| Retrieve reference to class definition structure. More...
bool | insert (const FROM *from, TO *to)
| Insert new Entry into Reference container. More...
bool | insert (const FROM *from, const SmartRef< TO > &to)
| Insert new Entry into Reference container. More...
bool | insert (const FROM *from, const EntryType &to)
| Insert new Entry into Reference container. More...
EntryType & | reference (const FROM *from)
| Find Reference from it's source entry. More...
const EntryType & | reference (const FROM *from) const
| Find Reference from it's source entry (CONST) More...
bool | isReferenced (const FROM *from, const EntryType &to)
| Check if two entries are Referenced to each other. More...
bool | isReferenced (const FROM *from, const TO *to)
| Check if two entries are Referenced to each other. More...
bool | isReferenced (const FROM *from, const SmartRef< TO > &to)
| Check if two entries are Referenced to each other. More...
Public Member Functions inherited from RefTableBase< FROM, SmartRefVector< TO > >
| 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...
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...

## Additional Inherited Members
Public Types inherited from RefTableBase< FROM, SmartRefVector< TO > >
typedef FROM | KeyType
typedef SmartRefVector< TO > | 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...
Static Public Member Functions inherited from DataObject
static const CLID & | classID ()
| Retrieve reference to class definition structure (static access) More...
Public Attributes inherited from RefTableBase< FROM, SmartRefVector< TO > >
CLID | m_clid
| Class id of the reference table. More...
Protected Member Functions inherited from RefTableBase< FROM, SmartRefVector< TO > >
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...

## Detailed Description

### template<class FROM, class TO>
class RefTable1toN< FROM, TO >

Definition at line 188 of file RefTable.h.

## Constructor & Destructor Documentation

template<class FROM , class TO >

RefTable1toN< FROM, TO >::RefTable1toN | ( | const CLID & | clid,
|  | int | len = `16`
| ) |  |
| inline

Standard Constructor.

Definition at line 192 of file RefTable.h.

192 : RefTableBase<FROM, SmartRefVector<TO>>( clid, len ) {}
RefTableBase
template <class FROM, class TO, class MAPENTRY> class RefTable
Definition: RefTable.h:44
template<class FROM , class TO >

RefTable1toN< FROM, TO >::~RefTable1toN | ( |  | ) |
| override default

Standard Destructor.

## Member Function Documentation

template<class FROM , class TO >

virtual const CLID& RefTable1toN< FROM, TO >::clID | ( |  | ) | const
| inline virtual

Retrieve reference to class definition structure.

Reimplemented from DataObject.

Definition at line 197 of file RefTable.h.

197 { return m_clid; }
RefTableBase< FROM, SmartRefVector< TO > >::m_clid
CLID m_clid
Class id of the reference table.
Definition: RefTable.h:62
template<class FROM , class TO >

bool RefTable1toN< FROM, TO >::insert | ( | const FROM * | from,
|  | TO * | to
| ) |  |
| inline

Insert new Entry into Reference container.

Definition at line 199 of file RefTable.h.

200 {
201 EntryType* entry = i_reference( from );
202 if ( 0 == entry ) {
203 bool result = insertMapElement( from, EntryType() );
204 EntryType* newEntry = i_reference( from );
205 if ( !( 0 == newEntry ) ) {
206 newEntry->push_back( SmartRef<TO>( to ) );
207 return true;
208 }
209 return false;
210 }
211 entry->push_back( SmartRef<TO>( to ) );
212 return true;
213 }
SmartRef
Kernel objects: SmartRef.
Definition: SmartRef.h:66
RefTableBase< FROM, SmartRefVector< TO > >::i_reference
EntryType * i_reference(const KeyType *from)
Find Reference from it&#39;s source entry.
Definition: RefTable.h:77
RefTableBase< FROM, SmartRefVector< TO > >::EntryType
SmartRefVector< TO > EntryType
Definition: RefTable.h:50
RefTableBase< FROM, SmartRefVector< TO > >::insertMapElement
bool insertMapElement(const KeyType *from, EntryType &to)
Insert new Entry into Reference container.
Definition: RefTable.h:75
template<class FROM , class TO >

bool RefTable1toN< FROM, TO >::insert | ( | const FROM * | from,
|  | const SmartRef< TO > & | to
| ) |  |
| inline

Insert new Entry into Reference container.

Definition at line 215 of file RefTable.h.

216 {
217 EntryType* entry = i_reference( from );
218 if ( 0 == entry ) {
219 bool result = insertMapElement( from, EntryType() );
220 EntryType* newEntry = i_reference( from );
221 if ( !( 0 == newEntry ) ) {
222 newEntry->push_back( to );
223 return true;
224 }
225 return false;
226 }
227 entry->push_back( to );
228 return true;
229 }
RefTableBase< FROM, SmartRefVector< TO > >::i_reference
EntryType * i_reference(const KeyType *from)
Find Reference from it&#39;s source entry.
Definition: RefTable.h:77
RefTableBase< FROM, SmartRefVector< TO > >::EntryType
SmartRefVector< TO > EntryType
Definition: RefTable.h:50
RefTableBase< FROM, SmartRefVector< TO > >::insertMapElement
bool insertMapElement(const KeyType *from, EntryType &to)
Insert new Entry into Reference container.
Definition: RefTable.h:75
template<class FROM , class TO >

bool RefTable1toN< FROM, TO >::insert | ( | const FROM * | from,
|  | const EntryType & | to
| ) |  |
| inline

Insert new Entry into Reference container.

Definition at line 231 of file RefTable.h.

232 {
233 return insertMapElement( from, const_cast<EntryType&>( to ) );
234 }
RefTableBase< FROM, SmartRefVector< TO > >::insertMapElement
bool insertMapElement(const KeyType *from, EntryType &to)
Insert new Entry into Reference container.
Definition: RefTable.h:75
template<class FROM , class TO >

bool RefTable1toN< FROM, TO >::isReferenced | ( | const FROM * | from,
|  | const EntryType & | to
| ) |  |
| inline

Check if two entries are Referenced to each other.

Definition at line 250 of file RefTable.h.

251 {
252 auto e = i_reference( from );
253 return e && ( *e == to );
254 }
RefTableBase< FROM, SmartRefVector< TO > >::i_reference
EntryType * i_reference(const KeyType *from)
Find Reference from it&#39;s source entry.
Definition: RefTable.h:77
template<class FROM , class TO >

bool RefTable1toN< FROM, TO >::isReferenced | ( | const FROM * | from,
|  | const TO * | to
| ) |  |
| inline

Check if two entries are Referenced to each other.

Definition at line 256 of file RefTable.h.

256 { return isReferenced( from, SmartRef<TO>( to ) ); }
SmartRef
Kernel objects: SmartRef.
Definition: SmartRef.h:66
RefTable1toN::isReferenced
bool isReferenced(const FROM *from, const EntryType &to)
Check if two entries are Referenced to each other.
Definition: RefTable.h:250
template<class FROM , class TO >

bool RefTable1toN< FROM, TO >::isReferenced | ( | const FROM * | from,
|  | const SmartRef< TO > & | to
| ) |  |
| inline

Check if two entries are Referenced to each other.

Definition at line 258 of file RefTable.h.

259 {
260 const EntryType* e = i_reference( from );
261 return assoc && std::find( e->begin(), e->end(), to ) != e->end();
262 }
RefTableBase< FROM, SmartRefVector< TO > >::i_reference
EntryType * i_reference(const KeyType *from)
Find Reference from it&#39;s source entry.
Definition: RefTable.h:77
std::find
T find(T...args)
RefTableBase< FROM, SmartRefVector< TO > >::EntryType
SmartRefVector< TO > EntryType
Definition: RefTable.h:50
template<class FROM , class TO >

EntryType& RefTable1toN< FROM, TO >::reference | ( | const FROM * | from | ) |
| inline

Find Reference from it's source entry.

Definition at line 236 of file RefTable.h.

237 {
238 static EntryType empty;
239 EntryType* e = i_reference( from );
240 return e ? *e : empty;
241 }
RefTableBase< FROM, SmartRefVector< TO > >::i_reference
EntryType * i_reference(const KeyType *from)
Find Reference from it&#39;s source entry.
Definition: RefTable.h:77
RefTableBase< FROM, SmartRefVector< TO > >::EntryType
SmartRefVector< TO > EntryType
Definition: RefTable.h:50
template<class FROM , class TO >

const EntryType& RefTable1toN< FROM, TO >::reference | ( | const FROM * | from | ) | const
| inline

Find Reference from it's source entry (CONST)

Definition at line 243 of file RefTable.h.

244 {
245 static const EntryType empty;
246 EntryType* e = i_reference( from );
247 return e ? *e : empty;
248 }
RefTableBase< FROM, SmartRefVector< TO > >::i_reference
EntryType * i_reference(const KeyType *from)
Find Reference from it&#39;s source entry.
Definition: RefTable.h:77
RefTableBase< FROM, SmartRefVector< TO > >::EntryType
SmartRefVector< TO > EntryType
Definition: RefTable.h:50

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

- GaudiKernel/GaudiKernel/RefTable.h