| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

Public Member Functions | Protected Attributes | Friends

# LinkManager::Link Class Reference

Embedded class defining a symbolic link Note: No copy constructor; bitwise copy (done by the compiler) is just fine. More...

`#include <LinkManager.h>`

Collaboration diagram for LinkManager::Link:
[legend]

List of all members.

## Public Member Functions
| Link (long id, const std::string &path, const DataObject *pObject=0)
| Standard constructor.
| Link ()
| Standard constructor.
Link & | operator= (const Link &link)
| Equality operator: check pathes only.
virtual | ~Link ()
| Default destructor.
void | set (long id, const std::string &path, const DataObject *pObject)
| Update the link content.
bool | operator== (const Link &link) const
| Equality operator: check paths only.
void | setObject (const DataObject *pObject)
| Update object pointer.
DataObject * | object () const
| Const access to data object.
const std::string & | path () const
| Access to path of object.
long | ID () const
| Link identifier.
virtual IOpaqueAddress * | address ()
| Access to the object's address.
## Protected Attributes
std::string | m_path
| String containing path of symbolic link.
DataObject * | m_pObject
| Pointer to object behind the link.
long | m_id
| Link ID.
## Friends
class | LinkManager
| DataObject is a friend.

## Detailed Description

Embedded class defining a symbolic link Note: No copy constructor; bitwise copy (done by the compiler) is just fine.

Definition at line 30 of file LinkManager.h.

## Constructor & Destructor Documentation

LinkManager::Link::Link | ( | long | id,
|  | const std::string & | path,
|  | const DataObject * | pObject = `0`
| ) |  | `[inline]`

Standard constructor.

Definition at line 42 of file LinkManager.h.

        : m_path(path), m_id(id) {
          setObject(pObject);
        }

LinkManager::Link::Link | ( | ) | `[inline]`

Standard constructor.

Definition at line 47 of file LinkManager.h.

               : m_path(""), m_pObject(0), m_id(INVALID) {
        }

virtual LinkManager::Link::~Link | ( | ) | `[inline, virtual]`

Default destructor.

Definition at line 57 of file LinkManager.h.

                        {
        }

## Member Function Documentation

IOpaqueAddress * LinkManager::Link::address | ( | ) | `[virtual]`

Access to the object's address.

Access to the object's address from the link.

Definition at line 11 of file LinkManager.cpp.

                                             {
      if ( 0 != m_pObject )   {
        IRegistry* pReg = m_pObject->registry();
        if ( 0 != pReg )    {
          return pReg->address();
        }
      }
      return 0;
    }

long LinkManager::Link::ID | ( | ) | const`[inline]`

Link identifier.

Definition at line 82 of file LinkManager.h.

                            {
          return m_id;
        }

DataObject* LinkManager::Link::object | ( | ) | const`[inline]`

Const access to data object.

Definition at line 74 of file LinkManager.h.

                                     {
          return m_pObject;
        }

Link& LinkManager::Link::operator= | ( | const Link & | link ) | `[inline]`

Equality operator: check pathes only.

Definition at line 50 of file LinkManager.h.

                                           {
          setObject(link.m_pObject);
          m_path = link.m_path;
          m_id   = link.m_id;
          return *this;
        }

bool LinkManager::Link::operator== | ( | const Link & | link ) | const`[inline]`

Equality operator: check paths only.

Definition at line 66 of file LinkManager.h.

                                                  {
          return link.m_path == m_path;
        }

const std::string& LinkManager::Link::path | ( | ) | const`[inline]`

Access to path of object.

Definition at line 78 of file LinkManager.h.

                                          {
          return m_path;
        }

void LinkManager::Link::set | ( | long | id,
|  | const std::string & | path,
|  | const DataObject * | pObject
| ) |  | `[inline]`

Update the link content.

Definition at line 60 of file LinkManager.h.

                                                                              {
          setObject(pObject);
          m_path = path;
          m_id   = id;
        }

void LinkManager::Link::setObject | ( | const DataObject * | pObject ) | `[inline]`

Update object pointer.

Definition at line 70 of file LinkManager.h.

                                                    {
          m_pObject = const_cast<DataObject*>(pObject);
        }

## Friends And Related Function Documentation

friend class LinkManager`[friend]`

DataObject is a friend.

Definition at line 32 of file LinkManager.h.

## Member Data Documentation

long LinkManager::Link::m_id`[protected]`

Link ID.

Definition at line 39 of file LinkManager.h.

std::string LinkManager::Link::m_path`[protected]`

String containing path of symbolic link.

Definition at line 35 of file LinkManager.h.

DataObject* LinkManager::Link::m_pObject`[protected]`

Pointer to object behind the link.

Definition at line 37 of file LinkManager.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r1/GaudiKernel/GaudiKernel/LinkManager.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r1/GaudiKernel/src/Lib/LinkManager.cpp

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