The Gaudi Framework
master (2e57474e)
Toggle main menu visibility
Loading...
Searching...
No Matches
GenericAddress.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include <
GaudiKernel/IOpaqueAddress.h
>
14
#include <
GaudiKernel/Kernel.h
>
15
16
class
IRegistry
;
17
27
class
GAUDI_API
GenericAddress
:
public
IOpaqueAddress
{
28
protected
:
30
unsigned
long
m_refCount
= 0;
32
long
m_svcType
= 0;
34
CLID
m_clID
= 0;
36
std::string
m_par
[3];
38
unsigned
long
m_ipar
[2] = { 0xFFFFFFFF, 0xFFFFFFFF };
40
IRegistry
*
m_pRegistry
=
nullptr
;
41
42
public
:
44
GenericAddress
() =
default
;
46
GenericAddress
(
const
GenericAddress
& copy )
47
:
IOpaqueAddress
( copy ),
m_svcType
( copy.
m_svcType
),
m_clID
( copy.
m_clID
),
m_pRegistry
( copy.
m_pRegistry
) {
48
m_par
[0] = copy.
m_par
[0];
49
m_par
[1] = copy.
m_par
[1];
50
m_ipar
[0] = copy.
m_ipar
[0];
51
m_ipar
[1] = copy.
m_ipar
[1];
52
}
53
54
GenericAddress
(
long
svc,
const
CLID
& clid, std::string p1 =
""
, std::string p2 =
""
,
unsigned
long
ip1 = 0,
55
unsigned
long
ip2 = 0 )
56
:
m_svcType
( svc ),
m_clID
( clid ) {
57
m_par
[0] = std::move( p1 );
58
m_par
[1] = std::move( p2 );
59
m_ipar
[0] = ip1;
60
m_ipar
[1] = ip2;
61
}
62
63
GenericAddress
&
operator=
(
const
GenericAddress
& copy ) =
default
;
64
66
unsigned
long
addRef
()
override
{
return
++
m_refCount
; }
68
unsigned
long
release
()
override
{
69
unsigned
long
cnt = --
m_refCount
;
70
if
( 0 == cnt )
delete
this
;
71
return
cnt;
72
}
73
74
IRegistry
*
registry
()
const override
{
return
m_pRegistry
; }
76
void
setRegistry
(
IRegistry
* pRegistry )
override
{
m_pRegistry
= pRegistry; }
78
const
CLID
&
clID
()
const override
{
return
m_clID
; }
80
void
setClID
(
const
CLID
& clid ) {
m_clID
= clid; }
82
long
svcType
()
const override
{
return
m_svcType
; }
84
void
setSvcType
(
long
typ ) {
m_svcType
= typ; }
86
const
std::string*
par
()
const override
{
return
m_par
; }
88
const
unsigned
long
*
ipar
()
const override
{
return
m_ipar
; }
89
};
CLID
unsigned int CLID
Class ID definition.
Definition
ClassID.h:16
IOpaqueAddress.h
Kernel.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
GenericAddress::svcType
long svcType() const override
Access : retrieve the storage type of the class id.
Definition
GenericAddress.h:82
GenericAddress::addRef
unsigned long addRef() override
Add reference to object.
Definition
GenericAddress.h:66
GenericAddress::m_par
std::string m_par[3]
String parameters to be accessed.
Definition
GenericAddress.h:36
GenericAddress::setClID
void setClID(const CLID &clid)
Access : Set class ID of the link.
Definition
GenericAddress.h:80
GenericAddress::operator=
GenericAddress & operator=(const GenericAddress ©)=default
GenericAddress::setRegistry
void setRegistry(IRegistry *pRegistry) override
Set pointer to directory.
Definition
GenericAddress.h:76
GenericAddress::m_pRegistry
IRegistry * m_pRegistry
Pointer to corresponding directory.
Definition
GenericAddress.h:40
GenericAddress::GenericAddress
GenericAddress()=default
Dummy constructor.
GenericAddress::m_refCount
unsigned long m_refCount
Reference count.
Definition
GenericAddress.h:30
GenericAddress::clID
const CLID & clID() const override
Access : Retrieve class ID of the link.
Definition
GenericAddress.h:78
GenericAddress::GenericAddress
GenericAddress(const GenericAddress ©)
Standard Copy Constructor (note: m_refCount is NOT copied).
Definition
GenericAddress.h:46
GenericAddress::par
const std::string * par() const override
Retrieve string parameters.
Definition
GenericAddress.h:86
GenericAddress::m_clID
CLID m_clID
Class id.
Definition
GenericAddress.h:34
GenericAddress::registry
IRegistry * registry() const override
Pointer to directory.
Definition
GenericAddress.h:74
GenericAddress::GenericAddress
GenericAddress(long svc, const CLID &clid, std::string p1="", std::string p2="", unsigned long ip1=0, unsigned long ip2=0)
Standard Constructor.
Definition
GenericAddress.h:54
GenericAddress::release
unsigned long release() override
release reference to object
Definition
GenericAddress.h:68
GenericAddress::ipar
const unsigned long * ipar() const override
Retrieve integer parameters.
Definition
GenericAddress.h:88
GenericAddress::m_svcType
long m_svcType
Storage type.
Definition
GenericAddress.h:32
GenericAddress::setSvcType
void setSvcType(long typ)
Access : set the storage type of the class id.
Definition
GenericAddress.h:84
GenericAddress::m_ipar
unsigned long m_ipar[2]
Integer parameters to be accessed.
Definition
GenericAddress.h:38
IOpaqueAddress
Opaque address interface definition.
Definition
IOpaqueAddress.h:28
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition
IRegistry.h:29
GaudiKernel
include
GaudiKernel
GenericAddress.h
Generated on
for The Gaudi Framework by
1.17.0