| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
RefTable1toN< FROM, TO > Class Template Reference

`#include <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.
virtual | ~RefTable1toN ()
| Standard Destructor.
virtual const CLID & | clID () const
| Retrieve reference to class definition structure.
bool | insert (const FROM *from, TO *to)
| Insert new Entry into Reference container.
bool | insert (const FROM *from, const SmartRef< TO > &to)
| Insert new Entry into Reference container.
bool | insert (const FROM *from, const EntryType &to)
| Insert new Entry into Reference container.
EntryType & | reference (const FROM *from)
| Find Reference from it's source entry.
const EntryType & | reference (const FROM *from) const
| Find Reference from it's source entry (CONST)
bool | isReferenced (const FROM *from, const EntryType &to)
| Check if two entries are Referenced to each other.
bool | isReferenced (const FROM *from, const TO *to)
| Check if two entries are Referenced to each other.
bool | isReferenced (const FROM *from, const SmartRef< TO > &to)
| Check if two entries are Referenced to each other.
Public Member Functions inherited from RefTableBase< FROM, SmartRefVector< TO > >
| 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 Member Functions inherited from DataObject
| DataObject ()
| Standard Constructor.
| DataObject (const DataObject &)
| Copy Constructor.
virtual | ~DataObject ()
| Standard Destructor.
virtual unsigned long | addRef ()
| Add reference to object.
virtual unsigned long | release ()
| release reference to object
const std::string & | name () const
| Retreive DataObject name. It is the name when registered in the store.
virtual StatusCode | update ()
| Provide empty placeholder for internal object reconfiguration callback.
void | setRegistry (IRegistry *pRegistry)
| Set pointer to Registry.
IRegistry * | registry () const
| Get pointer to Registry.
LinkManager * | linkMgr () const
| Retrieve Link manager.
unsigned char | version () const
| Retrieve version number of this object representation.
void | setVersion (unsigned char vsn)
| Set version number of this object representation.
unsigned long | refCount () const
| Return the refcount.
virtual std::ostream & | fillStream (std::ostream &s) const
| Fill the output stream (ASCII)

## 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.
typedef TableType::iterator | iterator
| Definition of map iterator.
typedef TableType::const_iterator | const_iterator
| Definition of map iterator (CONST)
Static Public Member Functions inherited from DataObject
static const CLID & | classID ()
| Retrieve reference to class definition structure (static access)
Public Attributes inherited from RefTableBase< FROM, SmartRefVector< TO > >
CLID | m_clid
| Class id of the reference table.
Protected Member Functions inherited from RefTableBase< FROM, SmartRefVector< TO > >
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)
Friends inherited from DataObject

## Detailed Description

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

Definition at line 209 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 213 of file RefTable.h.

: RefTableBase< FROM , SmartRefVector<TO> >(clid, len) {
}
template<class FROM , class TO >

virtual RefTable1toN< FROM, TO >::~RefTable1toN | ( |  | ) |
| inline virtual

Standard Destructor.

Definition at line 217 of file RefTable.h.

{
}

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

{
return m_clid;
}
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 224 of file RefTable.h.

{
EntryType* entry = i_reference(from);
if ( 0 == entry ) {
bool result = insertMapElement(from, EntryType());
EntryType* newEntry = i_reference(from);
if ( !( 0 == newEntry) ) {
newEntry->push_back( SmartRef<TO>(to) );
return true;
}
return false;
}
entry->push_back( SmartRef<TO>(to) );
return true;
}
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 239 of file RefTable.h.

{
EntryType* entry = i_reference(from);
if ( 0 == entry ) {
bool result = insertMapElement(from, EntryType());
EntryType* newEntry = i_reference(from);
if ( !(0 == newEntry) ) {
newEntry->push_back( to );
return true;
}
return false;
}
entry->push_back( to );
return true;
}
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 254 of file RefTable.h.

{
return insertMapElement(from, const_cast<EntryType&>(to));
}
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 270 of file RefTable.h.

{
const EntryType* e = i_reference(from);
return (0 == e) ? false : (*e == to);
}
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 275 of file RefTable.h.

{
return isReferenced(from, SmartRef<TO>(to));
}
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 279 of file RefTable.h.

{
const EntryType* e = i_reference(from);
if ( 0 != assoc ) {
SmartRefVector<TO>::const_iterator i = std::find(e->begin(), e->end(), to);
return (i == e->end()) ? false : true;
}
return false;
}
template<class FROM , class TO >

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

Find Reference from it's source entry.

Definition at line 258 of file RefTable.h.

{
static EntryType empty;
EntryType* e = i_reference(from);
return (0 == e) ? empty : *e;
}
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 264 of file RefTable.h.

{
static EntryType empty;
EntryType* e = i_reference(from);
return (0 == e) ? empty : (*e);
}

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiKernel/GaudiKernel/RefTable.h