The Gaudi Framework  master (37c0b60a)
LinkManager::Link Class Referencefinal

Embedded class defining a symbolic link Note: No explicit copy constructor; implicit compiler generated one is just fine. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/LinkManager.h>

Collaboration diagram for LinkManager::Link:

Public Member Functions

 Link (long id, std::string path, DataObject *pObject=nullptr)
 Standard constructor. More...
 
 Link ()=default
 Standard constructor for Root I/O. More...
 
bool operator== (const Link &link) const
 Equality operator: check paths only. More...
 
void setObject (const DataObject *pObject)
 Update object pointer. More...
 
const DataObjectobject () const
 Const access to data object. More...
 
DataObjectobject ()
 
const std::stringpath () const
 Access to path of object. More...
 
long ID () const
 Link identifier. More...
 
IOpaqueAddressaddress ()
 Access to the object's address. More...
 

Private Attributes

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

Detailed Description

Embedded class defining a symbolic link Note: No explicit copy constructor; implicit compiler generated one is just fine.

Definition at line 41 of file LinkManager.h.

Constructor & Destructor Documentation

◆ Link() [1/2]

LinkManager::Link::Link ( long  id,
std::string  path,
DataObject pObject = nullptr 
)
inline

Standard constructor.

Definition at line 51 of file LinkManager.h.

52  : m_path( std::move( path ) ), m_pObject( pObject ), m_id( id ) {}

◆ Link() [2/2]

LinkManager::Link::Link ( )
default

Standard constructor for Root I/O.

Member Function Documentation

◆ address()

IOpaqueAddress * LinkManager::Link::address ( )

Access to the object's address.

Access to the object's address from the link.

Definition at line 32 of file LinkManager.cpp.

32  {
33  if ( m_pObject ) {
34  IRegistry* pReg = m_pObject->registry();
35  if ( pReg ) return pReg->address();
36  }
37  return nullptr;
38 }

◆ ID()

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

Link identifier.

Definition at line 65 of file LinkManager.h.

65 { return m_id; }

◆ object() [1/2]

DataObject* LinkManager::Link::object ( )
inline

Definition at line 61 of file LinkManager.h.

61 { return m_pObject; }

◆ object() [2/2]

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

Const access to data object.

Definition at line 60 of file LinkManager.h.

60 { return m_pObject; }

◆ operator==()

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

Equality operator: check paths only.

Definition at line 56 of file LinkManager.h.

56 { return link.m_path == m_path; }

◆ path()

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

Access to path of object.

Definition at line 63 of file LinkManager.h.

63 { return m_path; }

◆ setObject()

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

Update object pointer.

Definition at line 58 of file LinkManager.h.

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

Member Data Documentation

◆ m_id

long LinkManager::Link::m_id = INVALID
private

Link ID.

Definition at line 47 of file LinkManager.h.

◆ m_path

std::string LinkManager::Link::m_path
private

String containing path of symbolic link.

Definition at line 43 of file LinkManager.h.

◆ m_pObject

DataObject* LinkManager::Link::m_pObject = nullptr
private

Pointer to object behind the link.

Definition at line 45 of file LinkManager.h.


The documentation for this class was generated from the following files:
std::move
T move(T... args)
IRegistry
Definition: IRegistry.h:32
IRegistry::address
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
DataObject
Definition: DataObject.h:36
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:78