Gaudi Framework, version v23r9
Home
Generated: Thu Jul 18 2013
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiKernel
GaudiKernel
RegistryEntry.h
Go to the documentation of this file.
1
// $Id: RegistryEntry.h,v 1.8 2005/07/18 16:34:05 hmd Exp $
2
#ifndef GAUDIKERNEL_REGISTRYENTRY_H
3
#define GAUDIKERNEL_REGISTRYENTRY_H
4
5
// STL include files
6
#include <
vector
>
7
8
// Framework include files
9
#include "
GaudiKernel/Kernel.h
"
10
#include "
GaudiKernel/IRegistry.h
"
11
12
// Forward declarations
13
class
DataSvc
;
14
class
DataObject
;
15
class
IDataProviderSvc
;
16
class
IOpaqueAddress
;
17
class
IDataStoreAgent
;
18
19
20
namespace
DataSvcHelpers {
34
class
GAUDI_API
RegistryEntry
:
public
IRegistry
{
35
private
:
37
typedef
std::vector<IRegistry*>
Store
;
38
public
:
39
friend
class ::DataSvc;
41
typedef
Store::const_iterator
Iterator
;
42
private
:
44
unsigned
long
m_refCount
;
46
bool
m_isSoft
;
48
std::string
m_fullpath
;
50
std::string
m_path
;
52
RegistryEntry
*
m_pParent
;
54
IOpaqueAddress
*
m_pAddress
;
56
DataObject
*
m_pObject
;
58
IDataProviderSvc
*
m_pDataProviderSvc
;
60
Store
m_store
;
61
62
private
:
68
69
void
assemblePath(
std::string
& buffer)
const
;
71
IRegistry
* i_find (
const
IRegistry
* pDirectory )
const
;
73
RegistryEntry
* i_find (
const
std::string
&
path
)
const
;
75
RegistryEntry
* i_find (
const
DataObject
* pObject )
const
;
77
RegistryEntry
* i_add (
const
std::string
& name );
79
void
setParent(
RegistryEntry
* pParent);
81
void
setDataSvc
(
IDataProviderSvc
*
s
) {
82
m_pDataProviderSvc =
s
;
83
}
85
virtual
RegistryEntry
*
parentEntry
() {
86
return
m_pParent;
87
}
89
RegistryEntry
*
findLeaf
(
const
std::string
&
path
)
const
{
90
return
i_find(path);
91
}
93
RegistryEntry
*
findLeaf
(
const
DataObject
* key)
const
{
94
return
i_find(key);
95
}
97
void
makeHard (
DataObject
* pObject);
99
void
makeHard (
IOpaqueAddress
* pAddress);
101
void
makeSoft (
DataObject
* pObject);
103
void
makeSoft (
IOpaqueAddress
* pAddress);
104
public
:
106
RegistryEntry
(
const
std::string
&
path
,
RegistryEntry
* parent = 0);
108
virtual
~
RegistryEntry
();
110
virtual
unsigned
long
release();
112
virtual
unsigned
long
addRef
() {
113
return
++m_refCount;
114
}
116
const
std::string
&
name
()
const
{
117
return
m_path;
118
}
120
virtual
const
std::string
&
identifier
()
const
{
121
return
m_fullpath;
122
}
124
virtual
IDataProviderSvc
*
dataSvc
()
const
{
125
return
m_pDataProviderSvc;
126
}
128
virtual
DataObject
*
object
()
const
{
129
return
m_pObject;
130
}
132
virtual
IOpaqueAddress
*
address
()
const
{
133
return
m_pAddress;
134
}
136
virtual
IRegistry
*
parent
()
const
{
137
return
m_pParent;
138
}
140
virtual
bool
isSoft
()
const
{
141
return
m_isSoft;
142
}
144
const
Store
&
leaves
()
const
{
145
return
m_store;
146
}
148
virtual
int
size
()
const
{
149
return
m_store.size();
150
}
152
virtual
bool
isEmpty
()
const
{
153
return
m_store.size() == 0;
154
}
156
virtual
Iterator
begin
()
const
{
157
return
m_store.begin();
158
}
160
virtual
Iterator
end
()
const
{
161
return
m_store.end();
162
}
164
virtual
IRegistry
*
find
(
const
IRegistry
* obj )
const
{
165
return
i_find(obj);
166
}
168
virtual
IRegistry
*
find
(
const
std::string
&
path
)
const
{
169
return
i_find(path);
170
}
172
void
setAddress(
IOpaqueAddress
* pAddress);
174
void
setObject(
DataObject
* obj);
175
177
virtual
long
add
(
const
std::string
& name,
178
DataObject
* pObject,
179
bool
is_soft =
false
);
181
virtual
long
add
(
const
std::string
& name,
182
IOpaqueAddress
* pAddress,
183
bool
is_soft =
false
);
185
virtual
long
remove
(
const
std::string
& name);
187
virtual
long
add
(
IRegistry
* obj);
189
virtual
long
remove
(
IRegistry
* obj);
191
virtual
long
deleteElements();
193
virtual
long
traverseTree(
IDataStoreAgent
* pAgent,
int
level
= 0);
194
};
195
}
196
#endif // GAUDIKERNEL_REGISTRYENTRY_H
Generated at Thu Jul 18 2013 12:18:03 for Gaudi Framework, version v23r9 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004