| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

Public Member Functions

# RefTable1toN< FROM, TO > Class Template Reference

`#include <RefTable.h>`

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

List of all members.

## 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.

## 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 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 >::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 >::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 >

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 >

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);
      }

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;
      }

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines