![]() |
The Gaudi Framework
v27r0
|
Property manager helper class. More...
#include <GaudiKernel/PropertyMgr.h>
Public Member Functions | |
PropertyMgr (IInterface *iface=nullptr) | |
constructor from the interface More... | |
PropertyMgr (const PropertyMgr &)=delete | |
PropertyMgr & | operator= (const PropertyMgr &)=delete |
~PropertyMgr () override=default | |
virtual destructor More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none") |
Declare a property (templated) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, SimpleProperty< TYPE > &prop, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, SimplePropertyRef< TYPE > &prop, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, ToolHandle< TYPE > &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, ServiceHandle< TYPE > &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, ToolHandleArray< TYPE > &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, ServiceHandleArray< TYPE > &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
Property * | declareProperty (const std::string &name, DataObjectDescriptor &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
Property * | declareProperty (const std::string &name, DataObjectDescriptorCollection &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") |
Declare a remote property. More... | |
StatusCode | setProperty (const Property &p) override |
set the property form another property More... | |
StatusCode | setProperty (const std::string &s) override |
set the property from the property formatted string More... | |
StatusCode | setProperty (const std::string &n, const std::string &v) override |
set the property from name and the value More... | |
StatusCode | getProperty (Property *p) const override |
get the property More... | |
const Property & | getProperty (const std::string &name) const override |
get the property by name More... | |
StatusCode | getProperty (const std::string &n, std::string &v) const override |
convert the property to the string More... | |
const std::vector< Property * > & | getProperties () const override |
get all properties More... | |
bool | hasProperty (const std::string &name) const override |
Return true if we have a property with the given name. More... | |
StatusCode | queryInterface (const InterfaceID &iid, void **pinterface) override |
PropertyMgr (IInterface *iface=nullptr) | |
constructor from the interface More... | |
PropertyMgr (const PropertyMgr &)=delete | |
PropertyMgr & | operator= (const PropertyMgr &)=delete |
~PropertyMgr () override=default | |
virtual destructor More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none") |
Declare a property (templated) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, SimpleProperty< TYPE > &prop, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, SimplePropertyRef< TYPE > &prop, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, ToolHandle< TYPE > &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, ServiceHandle< TYPE > &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, ToolHandleArray< TYPE > &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Property * | declareProperty (const std::string &name, ServiceHandleArray< TYPE > &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
Property * | declareProperty (const std::string &name, DataObjectDescriptor &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
Property * | declareProperty (const std::string &name, DataObjectDescriptorCollection &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") |
Declare a remote property. More... | |
StatusCode | setProperty (const Property &p) override |
set the property form another property More... | |
StatusCode | setProperty (const std::string &s) override |
set the property from the property formatted string More... | |
StatusCode | setProperty (const std::string &n, const std::string &v) override |
set the property from name and the value More... | |
StatusCode | getProperty (Property *p) const override |
get the property More... | |
const Property & | getProperty (const std::string &name) const override |
get the property by name More... | |
StatusCode | getProperty (const std::string &n, std::string &v) const override |
convert the property to the string More... | |
const std::vector< Property * > & | getProperties () const override |
get all properties More... | |
bool | hasProperty (const std::string &name) const override |
Return true if we have a property with the given name. More... | |
StatusCode | queryInterface (const InterfaceID &iid, void **pinterface) override |
![]() | |
void * | i_cast (const InterfaceID &tid) const override |
Implementation of IInterface::i_cast. More... | |
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override |
Implementation of IInterface::queryInterface. More... | |
std::vector< std::string > | getInterfaceNames () const override |
Implementation of IInterface::getInterfaceNames. More... | |
implements ()=default | |
Default constructor. More... | |
implements (const implements &) | |
Copy constructor (zero the reference count) More... | |
implements & | operator= (const implements &) |
Assignment operator (do not touch the reference count). More... | |
~implements () override=default | |
Virtual destructor. More... | |
unsigned long | addRef () override |
Reference Interface instance. More... | |
unsigned long | release () override |
Release Interface instance. More... | |
unsigned long | refCount () const override |
Current reference count. More... | |
void * | i_cast (const InterfaceID &tid) const override |
Implementation of IInterface::i_cast. More... | |
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override |
Implementation of IInterface::queryInterface. More... | |
std::vector< std::string > | getInterfaceNames () const override |
Implementation of IInterface::getInterfaceNames. More... | |
implements ()=default | |
Default constructor. More... | |
implements (const implements &) | |
Copy constructor (zero the reference count) More... | |
implements & | operator= (const implements &) |
Assignment operator (do not touch the reference count). More... | |
~implements () override=default | |
Virtual destructor. More... | |
unsigned long | addRef () override |
Reference Interface instance. More... | |
unsigned long | release () override |
Release Interface instance. More... | |
unsigned long | refCount () const override |
Current reference count. More... | |
![]() | |
~extend_interfaces () override=default | |
Virtual destructor. More... | |
~extend_interfaces () override=default | |
Virtual destructor. More... | |
Protected Member Functions | |
Property * | property (const std::string &name) const |
Property * | property (const std::string &name) const |
Private Types | |
typedef std::vector< Property * > | Properties |
typedef std::pair< std::string, std::pair< IProperty *, std::string > > | RemProperty |
typedef std::vector< RemProperty > | RemoteProperties |
typedef std::vector< Property * > | Properties |
typedef std::pair< std::string, std::pair< IProperty *, std::string > > | RemProperty |
typedef std::vector< RemProperty > | RemoteProperties |
Private Member Functions | |
Property * | property (const std::string &name, const std::vector< Property * > &props) const |
get the property by name form the proposed list More... | |
void | assertUniqueName (const std::string &name) const |
Throw an exception if the name is already present in the list of properties (see GAUDI-1023). More... | |
Property * | property (const std::string &name, const std::vector< Property * > &props) const |
get the property by name form the proposed list More... | |
void | assertUniqueName (const std::string &name) const |
Throw an exception if the name is already present in the list of properties (see GAUDI-1023). More... | |
Private Attributes | |
Properties | m_properties |
Collection of all declared properties. More... | |
RemoteProperties | m_remoteProperties |
Collection of all declared remote properties. More... | |
std::vector< std::unique_ptr< Property > > | m_todelete |
Properties to be deleted. More... | |
IInterface * | m_pOuter |
Interface hub reference (ApplicationMgr) More... | |
Additional Inherited Members | |
![]() | |
using | base_class = implements< Interfaces...> |
Typedef to this class. More... | |
using | extend_interfaces_base = extend_interfaces< Interfaces...> |
Typedef to the base of this class. More... | |
using | iids = typename extend_interfaces_base::ext_iids |
using | base_class = implements< Interfaces...> |
Typedef to this class. More... | |
using | extend_interfaces_base = extend_interfaces< Interfaces...> |
Typedef to the base of this class. More... | |
using | iids = typename extend_interfaces_base::ext_iids |
![]() | |
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type |
take union of the ext_iids of all Interfaces... More... | |
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type |
take union of the ext_iids of all Interfaces... More... | |
![]() | |
std::atomic_ulong | m_refCount = {0} |
Reference counter. More... | |
Property manager helper class.
This class is used by algorithms and services for helping to manage its own set of properties. It implements the IProperty interface.
Definition at line 35 of file PropertyMgr.h.
|
private |
Definition at line 168 of file PropertyMgr.h.
|
private |
Definition at line 168 of file PropertyMgr.h.
|
private |
Definition at line 171 of file PropertyMgr.h.
|
private |
Definition at line 171 of file PropertyMgr.h.
|
private |
Definition at line 170 of file PropertyMgr.h.
|
private |
Definition at line 170 of file PropertyMgr.h.
PropertyMgr::PropertyMgr | ( | IInterface * | iface = nullptr | ) |
constructor from the interface
Definition at line 52 of file PropertyMgr.cpp.
|
delete |
|
overridedefault |
virtual destructor
PropertyMgr::PropertyMgr | ( | IInterface * | iface = nullptr | ) |
constructor from the interface
|
delete |
|
overridedefault |
virtual destructor
|
private |
Throw an exception if the name is already present in the list of properties (see GAUDI-1023).
Definition at line 207 of file PropertyMgr.cpp.
|
private |
Throw an exception if the name is already present in the list of properties (see GAUDI-1023).
|
inline |
Declare a property (templated)
Definition at line 188 of file PropertyMgr.h.
Property* PropertyMgr::declareProperty | ( | const std::string & | name, |
TYPE & | value, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (templated)
|
inline |
Declare a property (specialization)
Declare a property (templated)
Definition at line 207 of file PropertyMgr.h.
Property* PropertyMgr::declareProperty | ( | const std::string & | name, |
SimpleProperty< TYPE > & | prop, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
|
inline |
Declare a property (specialization)
Declare a property (templated)
Definition at line 226 of file PropertyMgr.h.
Property* PropertyMgr::declareProperty | ( | const std::string & | name, |
SimplePropertyRef< TYPE > & | prop, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
|
inline |
Declare a property (specialization)
Definition at line 245 of file PropertyMgr.h.
Property* PropertyMgr::declareProperty | ( | const std::string & | name, |
ToolHandle< TYPE > & | ref, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
|
inline |
Declare a property (specialization)
Definition at line 262 of file PropertyMgr.h.
Property* PropertyMgr::declareProperty | ( | const std::string & | name, |
ServiceHandle< TYPE > & | ref, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
|
inline |
Declare a property (specialization)
Definition at line 279 of file PropertyMgr.h.
Property* PropertyMgr::declareProperty | ( | const std::string & | name, |
ToolHandleArray< TYPE > & | ref, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
|
inline |
Declare a property (specialization)
Definition at line 296 of file PropertyMgr.h.
Property* PropertyMgr::declareProperty | ( | const std::string & | name, |
ServiceHandleArray< TYPE > & | ref, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
Property* PropertyMgr::declareProperty | ( | const std::string & | name, |
DataObjectDescriptor & | ref, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
|
inline |
Declare a property (specialization)
Definition at line 313 of file PropertyMgr.h.
Property* PropertyMgr::declareProperty | ( | const std::string & | name, |
DataObjectDescriptorCollection & | ref, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
|
inline |
Declare a property (specialization)
Definition at line 329 of file PropertyMgr.h.
Property* PropertyMgr::declareRemoteProperty | ( | const std::string & | name, |
IProperty * | rsvc, | ||
const std::string & | rname = "" |
||
) |
Declare a remote property.
Property * PropertyMgr::declareRemoteProperty | ( | const std::string & | name, |
IProperty * | rsvc, | ||
const std::string & | rname = "" |
||
) |
Declare a remote property.
Definition at line 61 of file PropertyMgr.cpp.
|
override |
get all properties
Definition at line 186 of file PropertyMgr.cpp.
|
override |
get all properties
|
override |
get the property
|
override |
get the property
Definition at line 144 of file PropertyMgr.cpp.
|
override |
get the property by name
|
override |
get the property by name
Definition at line 159 of file PropertyMgr.cpp.
|
override |
convert the property to the string
|
override |
convert the property to the string
Definition at line 171 of file PropertyMgr.cpp.
|
override |
Return true if we have a property with the given name.
|
override |
Return true if we have a property with the given name.
Definition at line 201 of file PropertyMgr.cpp.
|
delete |
|
delete |
|
protected |
Definition at line 85 of file PropertyMgr.cpp.
|
protected |
|
private |
get the property by name form the proposed list
|
private |
|
override |
|
override |
Definition at line 190 of file PropertyMgr.cpp.
|
override |
set the property form another property
Definition at line 105 of file PropertyMgr.cpp.
|
override |
set the property form another property
|
override |
set the property from the property formatted string
|
override |
set the property from the property formatted string
Definition at line 120 of file PropertyMgr.cpp.
|
override |
set the property from name and the value
|
override |
set the property from name and the value
Definition at line 134 of file PropertyMgr.cpp.
|
private |
Interface hub reference (ApplicationMgr)
Definition at line 180 of file PropertyMgr.h.
|
private |
Collection of all declared properties.
Definition at line 174 of file PropertyMgr.h.
|
private |
Collection of all declared remote properties.
Definition at line 176 of file PropertyMgr.h.
|
private |
Properties to be deleted.
Definition at line 178 of file PropertyMgr.h.