| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Attributes | List of all members
LinkManager::Link Class Referencefinal

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:
[legend]

## Public Member Functions
| Link (long id, std::string path, DataObject *pObject=nullptr)
| Standard constructor. More...
| Link ()=default
| Standard constructor. More...
void | set (long id, std::string path, 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...
const DataObject * | object () const
| Const access to data object. More...
DataObject * | object ()
const std::string & | path () const
| Access to path of object. More...
long | ID () const
| Link identifier. More...
IOpaqueAddress * | address ()
| Access to the object's address. More...

## Private Attributes
std::string | m_path
| DataObject is a friend. More...
DataObject * | m_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 copy constructor; bitwise copy (done by the compiler) is just fine.

Definition at line 31 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 43 of file LinkManager.h.

44 : m_path( std::move( path ) ), m_pObject( pObject ), m_id( id ) {}
LinkManager::Link::path
const std::string & path() const
Access to path of object.
Definition: LinkManager.h:61
LinkManager::Link::m_id
long m_id
Link ID.
Definition: LinkManager.h:39
std::move
T move(T... args)
LinkManager::Link::m_pObject
DataObject * m_pObject
Pointer to object behind the link.
Definition: LinkManager.h:37
LinkManager::Link::m_path
std::string m_path
DataObject is a friend.
Definition: LinkManager.h:35

## ◆ Link() [2/2]

LinkManager::Link::Link | ( |  | ) |
| default

Standard constructor.

## 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 14 of file LinkManager.cpp.

14 {
15 if ( m_pObject ) {
16 IRegistry* pReg = m_pObject->registry();
17 if ( pReg ) return pReg->address();
18 }
19 return nullptr;
20 }
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
IRegistry::address
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
LinkManager::Link::m_pObject
DataObject * m_pObject
Pointer to object behind the link.
Definition: LinkManager.h:37

## ◆ ID()

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

Link identifier.

Definition at line 63 of file LinkManager.h.

63 { return m_id; }
LinkManager::Link::m_id
long m_id
Link ID.
Definition: LinkManager.h:39

## ◆ object() [1/2]

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

Const access to data object.

Definition at line 58 of file LinkManager.h.

58 { return m_pObject; }
LinkManager::Link::m_pObject
DataObject * m_pObject
Pointer to object behind the link.
Definition: LinkManager.h:37

## ◆ object() [2/2]

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

Definition at line 59 of file LinkManager.h.

59 { return m_pObject; }
LinkManager::Link::m_pObject
DataObject * m_pObject
Pointer to object behind the link.
Definition: LinkManager.h:37

## ◆ operator==()

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

Equality operator: check paths only.

Definition at line 54 of file LinkManager.h.

54 { return link.m_path == m_path; }
LinkManager::link
Link * link(long id)
Retrieve symbolic link identified by ID.
Definition: LinkManager.cpp:29
LinkManager::Link::m_path
std::string m_path
DataObject is a friend.
Definition: LinkManager.h:35

## ◆ path()

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

Access to path of object.

Definition at line 61 of file LinkManager.h.

61 { return m_path; }
LinkManager::Link::m_path
std::string m_path
DataObject is a friend.
Definition: LinkManager.h:35

## ◆ set()

void LinkManager::Link::set | ( | long | id,
|  | std::string | path,
|  | DataObject * | pObject
| ) |  |
| inline

Update the link content.

Definition at line 48 of file LinkManager.h.

48 {
49 setObject( pObject );
50 m_path = std::move( path );
51 m_id = id;
52 }
LinkManager::Link::setObject
void setObject(const DataObject *pObject)
Update object pointer.
Definition: LinkManager.h:56
LinkManager::Link::path
const std::string & path() const
Access to path of object.
Definition: LinkManager.h:61
LinkManager::Link::m_id
long m_id
Link ID.
Definition: LinkManager.h:39
std::move
T move(T... args)
LinkManager::Link::m_path
std::string m_path
DataObject is a friend.
Definition: LinkManager.h:35

## ◆ setObject()

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

Update object pointer.

Definition at line 56 of file LinkManager.h.

56 { m_pObject = const_cast<DataObject*>( pObject ); }
LinkManager::Link::m_pObject
DataObject * m_pObject
Pointer to object behind the link.
Definition: LinkManager.h:37

## Member Data Documentation

## ◆ m_id

long LinkManager::Link::m_id = INVALID
| private

Link ID.

Definition at line 39 of file LinkManager.h.

## ◆ m_path

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

DataObject is a friend.

String containing path of symbolic link

Definition at line 35 of file LinkManager.h.

## ◆ m_pObject

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

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:

- GaudiKernel/GaudiKernel/LinkManager.h
- GaudiKernel/src/Lib/LinkManager.cpp