| # Gaudi Framework, version v21r7 |

Home |  | Generated: 22 Jan 2010

# RefTable1to1< FROM, TO > Class Template Reference

`#include <RefTable.h>`

Inheritance diagram for RefTable1to1< FROM, TO >:

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

[legend]

List of all members.

## Public Member Functions
| RefTable1to1 (const CLID &clid, int len=16)
| Standard Constructor.
virtual | ~RefTable1to1 ()
| 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 EntryType &to)
| Insert new Entry into Reference container.
TO * | reference (const FROM *from)
| Find Reference from it's source entry.
const TO * | reference (const FROM *from) const
| Find Reference from it's source entry (CONST).
bool | isReferenced (const FROM *from, const TO *to)
| Check if two entries are associated to each other.
bool | isReferenced (const FROM *from, const EntryType &to)
| Check if two entries are Referenced to each other.

## Detailed Description

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

Definition at line 158 of file RefTable.h.

## Constructor & Destructor Documentation

template<class FROM, class TO>

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

Standard Constructor.

Definition at line 162 of file RefTable.h.

    00163   : RefTableBase< FROM , SmartRef<TO> >(clid, len)
    00164   {
    00165   }

template<class FROM, class TO>

virtual RefTable1to1< FROM, TO >::~RefTable1to1 | ( |  | ) | `[inline, virtual]`

Standard Destructor.

Definition at line 167 of file RefTable.h.

    00167                             {
    00168   }

## Member Function Documentation

template<class FROM, class TO>

virtual const CLID& RefTable1to1< FROM, TO >::clID | ( |  | ) | const`[inline, virtual]`

Retrieve reference to class definition structure.

Reimplemented from DataObject.

Definition at line 170 of file RefTable.h.

    00170                                           {
    00171     return m_clid;
    00172   }

template<class FROM, class TO>

bool RefTable1to1< FROM, TO >::insert | ( | const FROM * | from,
|  | TO * | to |
| ) |  |  | `[inline]`

Insert new Entry into Reference container.

Definition at line 174 of file RefTable.h.

    00174                                               {
    00175     return insertMapElement(from, EntryType(to));
    00176   }

template<class FROM, class TO>

bool RefTable1to1< FROM, TO >::insert | ( | const FROM * | from,
|  | const EntryType & | to |
| ) |  |  | `[inline]`

Insert new Entry into Reference container.

Definition at line 178 of file RefTable.h.

    00178                                                           {
    00179     // We MUST check the environment of the smart pointer!
    00180     if ( 0 != to.data() || StreamBuffer::INVALID != to.hintID() )    {
    00181       return insertMapElement(from, EntryType(to));
    00182     }
    00183     return false;
    00184   }

template<class FROM, class TO>

TO* RefTable1to1< FROM, TO >::reference | ( | const FROM * | from | ) | `[inline]`

Find Reference from it's source entry.

Definition at line 186 of file RefTable.h.

    00186                                    {
    00187     EntryType* e = i_reference(from);
    00188     return (0 == e) ? 0 : (*e);
    00189   }

template<class FROM, class TO>

const TO* RefTable1to1< FROM, TO >::reference | ( | const FROM * | from | ) | const`[inline]`

Find Reference from it's source entry (CONST).

Definition at line 192 of file RefTable.h.

    00192                                                {
    00193     const EntryType* e = i_reference(from);
    00194     return (0 == e) ? 0 : (*e);
    00195   }

template<class FROM, class TO>

bool RefTable1to1< FROM, TO >::isReferenced | ( | const FROM * | from,
|  | const TO * | to |
| ) |  |  | `[inline]`

Check if two entries are associated to each other.

Definition at line 198 of file RefTable.h.

    00198                                                        {
    00199     const EntryType* e = i_reference(from);
    00200     return (e == 0) ? false : ((*e) == to);
    00201   }

template<class FROM, class TO>

bool RefTable1to1< FROM, TO >::isReferenced | ( | const FROM * | from,
|  | const EntryType & | to |
| ) |  |  | `[inline]`

Check if two entries are Referenced to each other.

Definition at line 203 of file RefTable.h.

    00203                                                               {
    00204     const EntryType* e = i_reference(from);
    00205     return (assoc!=0) ? ((*e)=!to) ? (e->target()==to.target()) : false : false;
    00206   }

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

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