![]() |
The Gaudi Framework
master (f31105fd)
|
Implementation of property with value of concrete type. More...
#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/Property.h>
Public Types | |
using | StorageType = TYPE |
Hosted type. More... | |
using | ValueType = typename std::remove_reference< StorageType >::type |
using | VerifierType = VERIFIER |
using | HandlersType = HANDLERS |
Public Member Functions | |
template<class T = StorageType> | |
Property (std::string name, T &&value, std::string doc="", std::string semantics="") | |
the constructor with property name, value and documentation. More... | |
template<std::derived_from< IProperty > OWNER, typename T = ValueType> | |
requires (std::is_default_constructible_v< T >) Property(OWNER *owner | |
Autodeclaring constructor with property name, value and documentation. More... | |
std::string | setOwnerType () |
template<std::derived_from< IProperty > OWNER, class T = StorageType> | |
Property (OWNER *owner, std::string name, T &&value, std::string doc="", std::string semantics="") | |
Autodeclaring constructor with property name, value and documentation. More... | |
template<std::derived_from< IProperty > OWNER, class T = StorageType> | |
Property (OWNER *owner, std::string name, T &&value, std::function< void(PropertyBase &)> handler, std::string doc="", std::string semantics="") | |
Autodeclaring constructor with property name, value, updateHandler and documentation. More... | |
template<std::derived_from< IProperty > OWNER, class T = StorageType> | |
Property (OWNER *owner, std::string name, T &&value, void(OWNER::*handler)(PropertyBase &), std::string doc="", std::string semantics="") | |
Autodeclaring constructor with property name, value, pointer to member function updateHandler and documentation. More... | |
template<std::derived_from< IProperty > OWNER, class T = StorageType> | |
Property (OWNER *owner, std::string name, T &&value, void(OWNER::*handler)(), std::string doc="", std::string semantics="") | |
Autodeclaring constructor with property name, value, pointer to member function updateHandler and documentation. More... | |
template<std::derived_from< IProperty > OWNER, class T = StorageType> | |
Property (OWNER *owner, std::string name, T &&value, std::function< void(PropertyBase &)> handler, Details::Property::ImmediatelyInvokeHandler invoke, std::string doc="", std::string semantics="") | |
Autodeclaring constructor with property name, value, updateHandler and documentation. More... | |
template<typename T > | |
requires (!std::is_same_v< Property, std::remove_reference_t< T >>) Property(T &&v) | |
Construct an anonymous property from a value. More... | |
template<typename T = StorageType> | |
requires (!std::is_reference_v< T >) Property() | |
Construct an anonymous property with default constructed value. More... | |
Details::PropertyBase & | declareReadHandler (std::function< void(Details::PropertyBase &)> fun) override |
set new callback for reading More... | |
Details::PropertyBase & | declareUpdateHandler (std::function< void(Details::PropertyBase &)> fun) override |
set new callback for update More... | |
const std::function< void(Details::PropertyBase &)> | readCallBack () const override |
get a reference to the readCallBack More... | |
const std::function< void(Details::PropertyBase &)> | updateCallBack () const override |
get a reference to the updateCallBack More... | |
bool | useUpdateHandler () override |
manual trigger for callback for update More... | |
operator const ValueType & () const | |
Automatic conversion to value (const reference). More... | |
template<typename Dummy = TYPE> | |
requires (std::is_constructible_v< std::string_view, Dummy >) operator std | |
const VerifierType & | verifier () const |
Accessor to verifier. More... | |
VerifierType & | verifier () |
Accessor to verifier. More... | |
template<class... Args> | |
decltype( | operator() (Args &&... args) const noexcept(noexcept(std::declval< ValueType >()(std::declval< Args && >()...))) std::declval< ValueType >()(std::declval< Args && >()...)) |
bool | assign (const Details::PropertyBase &source) override |
get the value from another property More... | |
bool | load (Details::PropertyBase &dest) const override |
set value to another property More... | |
StatusCode | fromString (const std::string &source) override |
string -> value More... | |
std::string | toString () const override |
value -> string More... | |
void | toStream (std::ostream &out) const override |
value -> stream More... | |
const ValueType & | value () const |
ValueType & | value () |
bool | setValue (const ValueType &v) |
bool | set (const ValueType &v) |
Details::PropertyBase * | clone () const override |
clones the current property More... | |
Helpers for easy use of string and vector properties. | |
They are instantiated only if they are implemented in the wrapped class. | |
template<class = ValueType> | |
Property & | operator++ () |
template<class = ValueType> | |
ValueType | operator++ (int) |
template<class = ValueType> | |
Property & | operator-- () |
template<class = ValueType> | |
ValueType | operator-- (int) |
template<class T = ValueType> | |
Property & | operator+= (const T &other) |
template<class T = ValueType> | |
Property & | operator-= (const T &other) |
![]() | |
const std::string | name () const |
property name More... | |
std::string | documentation () const |
property documentation More... | |
std::string | semantics () const |
property semantics More... | |
const std::type_info * | type_info () const |
property type-info More... | |
std::string | type () const |
property type More... | |
template<class HT > | |
PropertyBase & | declareReadHandler (void(HT::*MF)(PropertyBase &), HT *instance) |
template<class HT > | |
PropertyBase & | declareUpdateHandler (void(HT::*MF)(PropertyBase &), HT *instance) |
virtual | ~PropertyBase () |
virtual destructor More... | |
void | setName (std::string value) |
set the new value for the property name More... | |
void | setDocumentation (std::string value) |
set the documentation string More... | |
void | setSemantics (std::string value) |
set the semantics string More... | |
virtual std::ostream & | fillStream (std::ostream &) const |
the printout of the property value More... | |
void | setOwnerType (const std::type_info &ownerType) |
set the type of the owner class (used for documentation) More... | |
template<class OWNER > | |
void | setOwnerType () |
set the type of the owner class (used for documentation) More... | |
const std::type_info * | ownerType () const |
get the type of the owner class (used for documentation) More... | |
std::string | ownerTypeName () const |
get the string for the type of the owner class (used for documentation) More... | |
Public Attributes | |
std::string | name: Property( std::move( name ) |
std::string | ValueType {} |
Private Attributes | |
StorageType | m_value |
Storage. More... | |
VerifierType | m_verifier |
HandlersType | m_handlers |
Additional Inherited Members | |
![]() | |
PropertyBase (const std::type_info &type, std::string name="", std::string doc="", std::string semantics="") | |
constructor from the property name and the type More... | |
PropertyBase (std::string name, const std::type_info &type) | |
constructor from the property name and the type More... | |
PropertyBase (const PropertyBase &)=default | |
copy constructor More... | |
PropertyBase & | operator= (const PropertyBase &)=default |
assignment operator More... | |
Implementation of property with value of concrete type.
Definition at line 37 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::HandlersType = HANDLERS |
Definition at line 44 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::StorageType = TYPE |
Hosted type.
Definition at line 41 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::ValueType = typename std::remove_reference<StorageType>::type |
Definition at line 42 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::VerifierType = VERIFIER |
Definition at line 43 of file Property.h.
|
inline |
|
inline |
Autodeclaring constructor with property name, value and documentation.
Definition at line 74 of file Property.h.
|
inline |
Autodeclaring constructor with property name, value, updateHandler and documentation.
Definition at line 83 of file Property.h.
|
inline |
Autodeclaring constructor with property name, value, pointer to member function updateHandler and documentation.
Definition at line 92 of file Property.h.
|
inline |
Autodeclaring constructor with property name, value, pointer to member function updateHandler and documentation.
Definition at line 101 of file Property.h.
|
inline |
Autodeclaring constructor with property name, value, updateHandler and documentation.
Definition at line 111 of file Property.h.
|
inlineoverridevirtual |
get the value from another property
Implements Gaudi::Details::PropertyBase.
Definition at line 367 of file Property.h.
|
inlineoverridevirtual |
clones the current property
Implements Gaudi::Details::PropertyBase.
Definition at line 244 of file Property.h.
|
inlineoverridevirtual |
set new callback for reading
Implements Gaudi::Details::PropertyBase.
Definition at line 135 of file Property.h.
|
inlineoverridevirtual |
set new callback for update
Implements Gaudi::Details::PropertyBase.
Definition at line 140 of file Property.h.
|
inlineoverridevirtual |
string -> value
Implements Gaudi::Details::PropertyBase.
Definition at line 384 of file Property.h.
|
inlineoverridevirtual |
set value to another property
Implements Gaudi::Details::PropertyBase.
Definition at line 379 of file Property.h.
|
inline |
Automatic conversion to value (const reference).
Definition at line 161 of file Property.h.
|
inlinenoexcept |
Definition at line 360 of file Property.h.
|
inline |
Definition at line 303 of file Property.h.
|
inline |
Definition at line 308 of file Property.h.
|
inline |
Definition at line 321 of file Property.h.
|
inline |
Definition at line 312 of file Property.h.
|
inline |
Definition at line 317 of file Property.h.
|
inline |
Definition at line 326 of file Property.h.
|
inlineoverridevirtual |
get a reference to the readCallBack
Implements Gaudi::Details::PropertyBase.
Definition at line 146 of file Property.h.
|
inline |
Construct an anonymous property with default constructed value.
Can be used only if StorageType is default constructible.
Definition at line 128 of file Property.h.
|
inline |
Construct an anonymous property from a value.
This constructor is not generated if T is the current type, so that the compiler picks up the copy constructor instead of this one.
Definition at line 122 of file Property.h.
|
inline |
Definition at line 172 of file Property.h.
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::requires | ( | std::is_default_constructible_v< T > | ) |
Autodeclaring constructor with property name, value and documentation.
|
inline |
Definition at line 240 of file Property.h.
std::string Gaudi::Property< TYPE, VERIFIER, HANDLERS >::setOwnerType | ( | ) |
|
inline |
Definition at line 236 of file Property.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
get a reference to the updateCallBack
Implements Gaudi::Details::PropertyBase.
Definition at line 150 of file Property.h.
|
inlineoverridevirtual |
manual trigger for callback for update
Implements Gaudi::Details::PropertyBase.
Definition at line 155 of file Property.h.
|
inline |
Definition at line 235 of file Property.h.
|
inline |
Definition at line 234 of file Property.h.
|
inline |
|
inline |
|
private |
Definition at line 51 of file Property.h.
|
private |
Storage.
Definition at line 49 of file Property.h.
|
private |
Definition at line 50 of file Property.h.
std::string Gaudi::Property< TYPE, VERIFIER, HANDLERS >::name |
Definition at line 66 of file Property.h.
std::string Gaudi::Property< TYPE, VERIFIER, HANDLERS >::ValueType {} |
Definition at line 66 of file Property.h.