1 #ifndef GAUDIKERNEL_PROPERTYMGR_H
2 #define GAUDIKERNEL_PROPERTYMGR_H
15 #include "GaudiKernel/Property.h"
16 #include "GaudiKernel/IProperty.h"
49 (
const std::string&
name ,
51 const std::string& doc =
"none" ) ;
55 (
const std::string& name ,
57 const std::string& doc =
"none") ;
61 (
const std::string& name ,
63 const std::string& doc =
"none") ;
68 (
const std::string& name,
70 const std::string& doc =
"none" ) ;
74 (
const std::string& name,
76 const std::string& doc =
"none" ) ;
80 (
const std::string& name,
82 const std::string& doc =
"none" ) ;
86 (
const std::string& name,
88 const std::string& doc =
"none" ) ;
91 (
const std::string& name ,
93 const std::string& rname =
"" ) ;
130 const std::vector<Property*>& getProperties( )
const override;
135 bool hasProperty(
const std::string& name)
const override;
143 Property* property (
const std::string& name )
const ;
149 (
const std::string& name ,
150 const std::vector<Property*>& props )
const ;
154 void assertUniqueName(
const std::string& name)
const;
158 typedef std::pair<std::string,
179 const std::string& doc )
181 assertUniqueName(name);
183 Property* p = m_todelete.back().get();
186 m_properties .push_back( p ) ;
193 template <
class TYPE>
196 (
const std::string& name ,
198 const std::string& doc )
200 assertUniqueName(name);
203 p -> setName ( name ) ;
204 p -> setDocumentation ( doc ) ;
205 m_properties.push_back ( p ) ;
212 template <
class TYPE>
215 (
const std::string& name ,
217 const std::string& doc )
219 assertUniqueName(name);
222 p -> setName ( name ) ;
223 p -> setDocumentation ( doc ) ;
224 m_properties.push_back ( p ) ;
234 (
const std::string& name,
236 const std::string& doc )
238 assertUniqueName(name);
240 Property* p = m_todelete.back().get();
242 p -> setDocumentation ( doc ) ;
243 m_properties . push_back ( p ) ;
251 (
const std::string& name,
253 const std::string& doc )
255 assertUniqueName(name);
257 Property* p = m_todelete.back().get();
259 p -> setDocumentation ( doc ) ;
260 m_properties . push_back ( p ) ;
268 (
const std::string& name,
270 const std::string& doc )
272 assertUniqueName(name);
274 Property* p = m_todelete.back().get();
276 p -> setDocumentation ( doc ) ;
277 m_properties . push_back ( p ) ;
285 (
const std::string& name,
287 const std::string& doc )
289 assertUniqueName(name);
291 Property* p = m_todelete.back().get();
293 p -> setDocumentation ( doc ) ;
294 m_properties . push_back ( p ) ;
302 #endif // GAUDIKERNEL_PROPERTYMGR_H
Handle to be used in lieu of naked pointers to services.
Base class used to implement the interfaces.
SimplePropertyRef templated class.
void setDocumentation(std::string documentation)
set the documentation string
GAUDI_API bool hasProperty(const IProperty *p, const std::string &name)
simple function which check the existence of the property with the given name.
const char *PyHelper() getProperty(IInterface *p, char *name)
Property manager helper class.
IInterface * m_pOuter
Interface hub reference (ApplicationMgr)
SimpleProperty concrete class which implements the full Property interface.
implements & operator=(const implements &)
Assignment operator (do not touch the reference count).
Properties m_properties
Collection of all declared properties.
RemoteProperties m_remoteProperties
Collection of all declared remote properties.
Property * declareProperty(const std::string &name, TYPE &value, const std::string &doc="none")
Declare a property (templated)
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
std::pair< std::string, std::pair< IProperty *, std::string > > RemProperty
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Array of Handles to be used in lieu of vector of naked pointers to tools.
std::vector< std::unique_ptr< Property > > m_todelete
Properties to be deleted.
Property base class allowing Property* collections to be "homogeneous".
StatusCode queryInterface(const InterfaceID &ti, void **pp) override
Implementation of IInterface::queryInterface.
std::vector< RemProperty > RemoteProperties
The IProperty is the basic interface for all components which have properties that can be set or get...
std::vector< Property * > Properties