| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

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

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

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

## Detailed Description

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

Definition at line 158 of file RefTable.h.

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

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

References RefTableBase< FROM, SmartRef< TO > >::m_clid.

    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.

References RefTableBase< FROM, SmartRef< TO > >::insertMapElement().

    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.

References SmartRef< TYPE >::data(), SmartRef< TYPE >::hintID(), RefTableBase< FROM, SmartRef< TO > >::insertMapElement(), and StreamBuffer::INVALID.

    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.

References RefTableBase< FROM, SmartRef< TO > >::i_reference().

    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.

References RefTableBase< FROM, SmartRef< TO > >::i_reference().

    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.

References RefTableBase< FROM, SmartRef< TO > >::i_reference().

    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.

References RefTableBase< FROM, SmartRef< TO > >::i_reference(), and SmartRef< TYPE >::target().

    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_v20r2/GaudiKernel/v25r2/GaudiKernel/RefTable.h