The Gaudi Framework
master (37c0b60a)
|
#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 |
template<class TYPE , typename = std::enable_if_t<!std::is_base_of_v<GaudiHandleBase, TYPE> && !std::is_base_of_v<GaudiHandleArrayBase, TYPE> && !std::is_base_of_v<Gaudi::DataHandle, TYPE>>> | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none") |
Declare a property (templated) More... | |
template<class TYPE > | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE > &prop, const std::string &doc="none") |
Declare a property (specialization) More... | |
template<class TYPE > | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE & > &prop, const std::string &doc="none") |
Declare a property (specialization) More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::DataHandle &ref, const std::string &doc="none") |
Declare a property (specialization) More... | |
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") |
Declare a remote property. More... | |
StatusCode | setProperty (const std::string &name, const Gaudi::Details::PropertyBase &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 | setPropertyRepr (const std::string &n, const std::string &v) override |
set the property from name and the value More... | |
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override |
get the property More... | |
const Gaudi::Details::PropertyBase & | getProperty (std::string_view name) const override |
get the property by name More... | |
StatusCode | getProperty (std::string_view n, std::string &v) const override |
convert the property to the string More... | |
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override |
get all properties More... | |
bool | hasProperty (std::string_view name) const override |
Return true if we have a property with the given name. More... | |
StatusCode | queryInterface (const InterfaceID &iid, void **pinterface) override |
Public Member Functions inherited from implements< IProperty > | |
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... | |
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... | |
Protected Member Functions | |
Gaudi::Details::PropertyBase * | property (std::string_view name) const |
Private Types | |
typedef std::vector< Gaudi::Details::PropertyBase * > | Properties |
typedef std::pair< std::string, std::pair< IProperty *, std::string > > | RemProperty |
typedef std::vector< RemProperty > | RemoteProperties |
Private Member Functions | |
Gaudi::Details::PropertyBase * | property (std::string_view name, const std::vector< Gaudi::Details::PropertyBase * > &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< Gaudi::Details::PropertyBase > > | m_todelete |
Properties to be deleted. More... | |
IInterface * | m_pOuter |
Interface hub reference (ApplicationMgr) More... | |
Additional Inherited Members | |
Public Types inherited from implements< IProperty > | |
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 |
Public Types inherited from extend_interfaces< Interfaces... > | |
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type |
take union of the ext_iids of all Interfaces... More... | |
Protected Attributes inherited from implements< IProperty > | |
std::atomic_ulong | m_refCount |
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 43 of file PropertyMgr.h.
|
private |
Definition at line 142 of file PropertyMgr.h.
|
private |
Definition at line 144 of file PropertyMgr.h.
|
private |
Definition at line 143 of file PropertyMgr.h.
PropertyMgr::PropertyMgr | ( | IInterface * | iface = nullptr | ) |
constructor from the interface
Definition at line 51 of file PropertyMgr.cpp.
|
delete |
|
private |
Throw an exception if the name is already present in the list of properties (see GAUDI-1023).
Definition at line 212 of file PropertyMgr.cpp.
PropertyBase * PropertyMgr::declareProperty | ( | const std::string & | name, |
Gaudi::DataHandle & | ref, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
Definition at line 89 of file PropertyMgr.cpp.
|
inline |
Declare a property (specialization)
Declare a property.
Definition at line 190 of file PropertyMgr.h.
|
inline |
Declare a property (specialization)
Declare a property (templated)
Definition at line 174 of file PropertyMgr.h.
PropertyBase * PropertyMgr::declareProperty | ( | const std::string & | name, |
GaudiHandleArrayBase & | ref, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
Definition at line 77 of file PropertyMgr.cpp.
PropertyBase * PropertyMgr::declareProperty | ( | const std::string & | name, |
GaudiHandleBase & | ref, | ||
const std::string & | doc = "none" |
||
) |
Declare a property (specialization)
Definition at line 67 of file PropertyMgr.cpp.
|
inline |
PropertyBase * PropertyMgr::declareRemoteProperty | ( | const std::string & | name, |
IProperty * | rsvc, | ||
const std::string & | rname = "" |
||
) |
|
override |
|
override |
|
override |
convert the property to the string
Definition at line 182 of file PropertyMgr.cpp.
|
override |
get the property by name
Definition at line 172 of file PropertyMgr.cpp.
|
override |
Return true if we have a property with the given name.
Definition at line 208 of file PropertyMgr.cpp.
|
delete |
|
protected |
Definition at line 109 of file PropertyMgr.cpp.
|
private |
|
override |
Definition at line 198 of file PropertyMgr.cpp.
|
override |
set the property form another property
Definition at line 127 of file PropertyMgr.cpp.
|
override |
set the property from the property formatted string
Definition at line 141 of file PropertyMgr.cpp.
|
override |
set the property from name and the value
Definition at line 151 of file PropertyMgr.cpp.
|
private |
Interface hub reference (ApplicationMgr)
Definition at line 153 of file PropertyMgr.h.
|
private |
Collection of all declared properties.
Definition at line 147 of file PropertyMgr.h.
|
private |
Collection of all declared remote properties.
Definition at line 149 of file PropertyMgr.h.
|
private |
Properties to be deleted.
Definition at line 151 of file PropertyMgr.h.