| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

GenericAddress.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_GENERICADDRESS_H
2 #define GAUDIKERNEL_GENERICADDRESS_H
3
4 // Framework include files
5 #include "GaudiKernel/IOpaqueAddress.h"
6 #include "GaudiKernel/Kernel.h"
7
8 // Forward declarations
9 class IRegistry;
10
20 class GAUDI_API GenericAddress : public IOpaqueAddress
21 {
22 protected:
24 unsigned long m_refCount = 0;
26 long m_svcType = 0;
28 CLID m_clID = 0;
30 std::string m_par[3];
32 unsigned long m_ipar[2] = {0xFFFFFFFF, 0xFFFFFFFF};
34 IRegistry* m_pRegistry = nullptr;
35
36 public:
38 GenericAddress() = default;
40 GenericAddress( const GenericAddress& copy )
41 : IOpaqueAddress( copy ), m_svcType( copy.m_svcType ), m_clID( copy.m_clID ), m_pRegistry( copy.m_pRegistry )
42 {
43 m_par[0] = copy.m_par[0];
44 m_par[1] = copy.m_par[1];
45 m_ipar[0] = copy.m_ipar[0];
46 m_ipar[1] = copy.m_ipar[1];
47 }
49 GenericAddress( long svc, const CLID& clid, std::string p1 = "", std::string p2 = "", unsigned long ip1 = 0,
50 unsigned long ip2 = 0 )
51 : m_svcType( svc ), m_clID( clid )
52 {
53 m_par[0] = std::move( p1 );
54 m_par[1] = std::move( p2 );
55 m_ipar[0] = ip1;
56 m_ipar[1] = ip2;
57 }
58
60 ~GenericAddress() override = default;
61
63 unsigned long addRef() override { return ++m_refCount; }
65 unsigned long release() override
66 {
67 int cnt = --m_refCount;
68 if ( 0 == cnt ) delete this;
69 return cnt;
70 }
72 IRegistry* registry() const override { return m_pRegistry; }
74 void setRegistry( IRegistry* pRegistry ) override { m_pRegistry = pRegistry; }
76 const CLID& clID() const override { return m_clID; }
78 void setClID( const CLID& clid ) { m_clID = clid; }
80 long svcType() const override { return m_svcType; }
82 void setSvcType( long typ ) { m_svcType = typ; }
84 const std::string* par() const override { return m_par; }
86 const unsigned long* ipar() const override { return m_ipar; }
87 };
88 #endif // GAUDIKERNEL_GENERICADDRESS_H
GenericAddress::GenericAddress
GenericAddress(const GenericAddress &copy)
Standard Copy Constructor (note: m_refCount is NOT copied)
Definition: GenericAddress.h:40
GenericAddress::m_ipar
unsigned long m_ipar[2]
Integer parameters to be accessed.
Definition: GenericAddress.h:32
Kernel.h
GenericAddress::m_par
std::string m_par[3]
String parameters to be accessed.
Definition: GenericAddress.h:30
GenericAddress::setSvcType
void setSvcType(long typ)
Access : set the storage type of the class id.
Definition: GenericAddress.h:82
GenericAddress::addRef
unsigned long addRef() override
Add reference to object.
Definition: GenericAddress.h:63
GenericAddress::release
unsigned long release() override
release reference to object
Definition: GenericAddress.h:65
GenericAddress::registry
IRegistry * registry() const override
Pointer to directory.
Definition: GenericAddress.h:72
GenericAddress
Generic Transient Address.
Definition: GenericAddress.h:20
std::string
STL class.
GenericAddress::setClID
void setClID(const CLID &clid)
Access : Set class ID of the link.
Definition: GenericAddress.h:78
HiveAlgSequencer.p2
p2
Definition: HiveAlgSequencer.py:23
GenericAddress::ipar
const unsigned long * ipar() const override
Retrieve integer parameters.
Definition: GenericAddress.h:86
GenericAddress::par
const std::string * par() const override
Retrieve string parameters.
Definition: GenericAddress.h:84
IRegistry
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
GenericAddress::setRegistry
void setRegistry(IRegistry *pRegistry) override
Set pointer to directory.
Definition: GenericAddress.h:74
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
GenericAddress::svcType
long svcType() const override
Access : retrieve the storage type of the class id.
Definition: GenericAddress.h:80
std::move
T move(T...args)
IOpaqueAddress.h
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:49
HiveAlgSequencer.p1
p1
Definition: HiveAlgSequencer.py:22
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
GenericAddress::clID
const CLID & clID() const override
Access : Retrieve class ID of the link.
Definition: GenericAddress.h:76
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110