![]() |
The Gaudi Framework
v30r3 (a5ef0a68)
|
Implementation of property with value of concrete type. More...
#include <GaudiKernel/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="") | |
the constructor with property name, value and documentation. More... | |
template<typename OWNER , typename T = ValueType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>, typename = std::enable_if_t<std::is_default_constructible<T>::value>> | |
Property (OWNER *owner, std::string name) | |
Autodeclaring constructor with property name, value and documentation. More... | |
template<class OWNER , class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>> | |
Property (OWNER *owner, std::string name, T &&value, std::string doc="") | |
Autodeclaring constructor with property name, value and documentation. More... | |
template<typename T , typename = not_copying<T>> | |
Property (T &&v) | |
Construct an anonymous property from a value. More... | |
template<typename T = StorageType, typename = std::enable_if_t<!std::is_reference<T>::value>> | |
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<class T > | |
bool | operator== (const T &other) const |
equality comparison More... | |
template<class T > | |
bool | operator!= (const T &other) const |
inequality comparison More... | |
template<class T > | |
bool | operator< (const T &other) const |
"less" comparison More... | |
template<class T = ValueType> | |
Property & | operator= (T &&v) |
Assignment from value. More... | |
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 |
Backward compatibility (. More... | |
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... | |
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 ()=default |
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... | |
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... | |
Private Types | |
template<class T > | |
using | is_this_type = std::is_same< Property, std::remove_reference_t< T >> |
helper typedefs for SFINAE More... | |
template<class T > | |
using | not_copying = std::enable_if_t<!is_this_type< T >::value > |
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="") | |
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 381 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::HandlersType = HANDLERS |
Definition at line 389 of file Property.h.
|
private |
helper typedefs for SFINAE
Definition at line 399 of file Property.h.
|
private |
Definition at line 401 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::StorageType = TYPE |
Hosted type.
Definition at line 386 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::ValueType = typename std::remove_reference<StorageType>::type |
Definition at line 387 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::VerifierType = VERIFIER |
Definition at line 388 of file Property.h.
|
inline |
the constructor with property name, value and documentation.
Definition at line 407 of file Property.h.
|
inline |
Autodeclaring constructor with property name, value and documentation.
Definition at line 418 of file Property.h.
|
inline |
Autodeclaring constructor with property name, value and documentation.
Definition at line 427 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 438 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 445 of file Property.h.
|
inlineoverridevirtual |
get the value from another property
Implements Gaudi::Details::PropertyBase.
Definition at line 701 of file Property.h.
|
inlineoverridevirtual |
clones the current property
Implements Gaudi::Details::PropertyBase.
Definition at line 552 of file Property.h.
|
inlineoverridevirtual |
set new callback for reading
Implements Gaudi::Details::PropertyBase.
Definition at line 453 of file Property.h.
|
inlineoverridevirtual |
set new callback for update
Implements Gaudi::Details::PropertyBase.
Definition at line 459 of file Property.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
set value to another property
Implements Gaudi::Details::PropertyBase.
Definition at line 714 of file Property.h.
|
inline |
|
inline |
|
inlinenoexcept |
Definition at line 693 of file Property.h.
|
inline |
Definition at line 624 of file Property.h.
|
inline |
Definition at line 630 of file Property.h.
|
inline |
Definition at line 646 of file Property.h.
|
inline |
Definition at line 635 of file Property.h.
|
inline |
Definition at line 641 of file Property.h.
|
inline |
Definition at line 652 of file Property.h.
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
get a reference to the readCallBack
Implements Gaudi::Details::PropertyBase.
Definition at line 466 of file Property.h.
|
inline |
Definition at line 547 of file Property.h.
|
inline |
Definition at line 542 of file Property.h.
|
inlineoverridevirtual |
value -> stream
Implements Gaudi::Details::PropertyBase.
Definition at line 733 of file Property.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
get a reference to the updateCallBack
Implements Gaudi::Details::PropertyBase.
Definition at line 471 of file Property.h.
|
inlineoverridevirtual |
manual trigger for callback for update
Implements Gaudi::Details::PropertyBase.
Definition at line 477 of file Property.h.
|
inline |
|
inline |
Definition at line 541 of file Property.h.
|
inline |
|
inline |
|
private |
Definition at line 395 of file Property.h.
|
private |
Storage.
Definition at line 393 of file Property.h.
|
private |
Definition at line 394 of file Property.h.