All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 <GaudiKernel/LinkManager.h>

Collaboration diagram for LinkManager::Link:

Public Member Functions

 Link (long id, const std::string &path, const DataObject *pObject=0)
 Standard constructor. More...
 
 Link ()
 Standard constructor. More...
 
Linkoperator= (const Link &link)
 Equality operator: check pathes only. More...
 
virtual ~Link ()
 Default destructor. More...
 
void set (long id, const std::string &path, const DataObject *pObject)
 Update the link content. More...
 
bool operator== (const Link &link) const
 Equality operator: check paths only. More...
 
void setObject (const DataObject *pObject)
 Update object pointer. More...
 
DataObjectobject () const
 Const access to data object. More...
 
const std::string & path () const
 Access to path of object. More...
 
long ID () const
 Link identifier. More...
 
virtual IOpaqueAddressaddress ()
 Access to the object's address. More...
 

Protected Attributes

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

Friends

class LinkManager
 DataObject is a friend. More...
 

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.

43  : m_path(path), m_id(id) {
44  setObject(pObject);
45  }
LinkManager::Link::Link ( )
inline

Standard constructor.

Definition at line 47 of file LinkManager.h.

47  : m_path(""), m_pObject(0), m_id(INVALID) {
48  }
virtual LinkManager::Link::~Link ( )
inlinevirtual

Default destructor.

Definition at line 57 of file LinkManager.h.

57  {
58  }

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.

11  {
12  if ( 0 != m_pObject ) {
13  IRegistry* pReg = m_pObject->registry();
14  if ( 0 != pReg ) {
15  return pReg->address();
16  }
17  }
18  return 0;
19 }
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
long LinkManager::Link::ID ( ) const
inline

Link identifier.

Definition at line 82 of file LinkManager.h.

82  {
83  return m_id;
84  }
DataObject* LinkManager::Link::object ( ) const
inline

Const access to data object.

Definition at line 74 of file LinkManager.h.

74  {
75  return m_pObject;
76  }
Link& LinkManager::Link::operator= ( const Link link)
inline

Equality operator: check pathes only.

Definition at line 50 of file LinkManager.h.

50  {
52  m_path = link.m_path;
53  m_id = link.m_id;
54  return *this;
55  }
bool LinkManager::Link::operator== ( const Link link) const
inline

Equality operator: check paths only.

Definition at line 66 of file LinkManager.h.

66  {
67  return link.m_path == m_path;
68  }
const std::string& LinkManager::Link::path ( ) const
inline

Access to path of object.

Definition at line 78 of file LinkManager.h.

78  {
79  return m_path;
80  }
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.

60  {
61  setObject(pObject);
62  m_path = path;
63  m_id = id;
64  }
void LinkManager::Link::setObject ( const DataObject pObject)
inline

Update object pointer.

Definition at line 70 of file LinkManager.h.

70  {
71  m_pObject = const_cast<DataObject*>(pObject);
72  }
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31

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: