Gaudi Framework, version v20r2

Generated: 18 Jul 2008

LinkManager::Link Class Reference

#include <LinkManager.h>

Collaboration diagram for LinkManager::Link:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Definition at line 28 of file LinkManager.h.

Public Member Functions

 Link (long id, const std::string &path, const DataObject *pObject=0)
 Standard constructor.
 Link ()
 Standard constructor.
Linkoperator= (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 pathes only.
void setObject (const DataObject *pObject)
 Update object pointer.
DataObjectobject () const
 Const access to data object.
const std::stringpath () const
 Access to path of object.
long ID () const
 Link identifier.
virtual IOpaqueAddressaddress ()
 Access to the object's address.

Protected Attributes

std::string m_path
 String containing path of symbolic link.
DataObjectm_pObject
 Pointer to object behind the link.
long m_id
 Link ID.

Friends

class LinkManager
 DataObject is a friend.


Constructor & Destructor Documentation

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

Standard constructor.

Definition at line 40 of file LinkManager.h.

References setObject().

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

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

Standard constructor.

Definition at line 45 of file LinkManager.h.

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

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

Default destructor.

Definition at line 55 of file LinkManager.h.

00055                     {
00056     }


Member Function Documentation

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

Equality operator: check pathes only.

Definition at line 48 of file LinkManager.h.

References LinkManager::link(), m_id, m_path, m_pObject, and setObject().

00048                                        {
00049       setObject(link.m_pObject);
00050       m_path = link.m_path;
00051       m_id   = link.m_id;
00052       return *this;
00053     }

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

Update the link content.

Definition at line 58 of file LinkManager.h.

References m_id, m_path, path(), and setObject().

00058                                                                           {
00059       setObject(pObject);
00060       m_path = path;
00061       m_id   = id;
00062     }

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

Equality operator: check pathes only.

Definition at line 64 of file LinkManager.h.

References LinkManager::link(), and m_path.

00064                                               {
00065       return link.m_path == m_path;
00066     }

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

Update object pointer.

Definition at line 68 of file LinkManager.h.

References m_pObject.

Referenced by Objects::access(), SmartRefBase::accessData(), Link(), operator=(), and set().

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

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

Const access to data object.

Definition at line 72 of file LinkManager.h.

References m_pObject.

Referenced by Objects::access(), and SmartRefBase::accessData().

00072                                  {
00073       return m_pObject;
00074     }

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

Access to path of object.

Definition at line 76 of file LinkManager.h.

References m_path.

Referenced by Objects::access(), SmartRefBase::accessData(), SmartRefBase::isEqualEx(), SmartRefBase::path(), and set().

00076                                       {
00077       return m_path;
00078     }

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

Link identifier.

Definition at line 80 of file LinkManager.h.

References m_id.

Referenced by LinkManager::addLink().

00080                         {
00081       return m_id;
00082     }

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

Access to the object's address.

Definition at line 11 of file LinkManager.cpp.

References IRegistry::address(), m_pObject, and DataObject::registry().

00011                                          {
00012   if ( 0 != m_pObject )   {
00013     IRegistry* pReg = m_pObject->registry();
00014     if ( 0 != pReg )    {
00015       return pReg->address();
00016     }
00017   }
00018   return 0;
00019 }


Friends And Related Function Documentation

friend class LinkManager [friend]

DataObject is a friend.

Definition at line 30 of file LinkManager.h.


Member Data Documentation

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

String containing path of symbolic link.

Definition at line 33 of file LinkManager.h.

Referenced by operator=(), operator==(), path(), and set().

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

Pointer to object behind the link.

Definition at line 35 of file LinkManager.h.

Referenced by address(), object(), operator=(), and setObject().

long LinkManager::Link::m_id [protected]

Link ID.

Definition at line 37 of file LinkManager.h.

Referenced by ID(), operator=(), and set().


The documentation for this class was generated from the following files:
Generated at Fri Jul 18 12:08:34 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004