| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

Public Member Functions

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

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

template<class FROM , class TO >

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

Standard Destructor.

Definition at line 167 of file RefTable.h.

                                {
      }

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

                                              {
        return m_clid;
      }

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.

                                                  {
        return insertMapElement(from, EntryType(to));
      }

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.

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

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.

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

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.

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

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.

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

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.

                                                   {
        const EntryType* e = i_reference(from);
        return (0 == e) ? 0 : (*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