The Gaudi Framework
v29r0 (ff2e7097)
|
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<class OWNER , class T = ValueType, typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type, typename = typename std::enable_if<std::is_default_constructible<T>::value>::type> | |
Property (OWNER *owner, std::string name) | |
Autodeclaring constructor with property name, value and documentation. More... | |
template<class OWNER , class T = StorageType, typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type> | |
Property (OWNER *owner, std::string name, T &&value, std::string doc="") | |
Autodeclaring constructor with property name, value and documentation. More... | |
template<class T , typename = typename not_copying<T>::type> | |
Property (T &&v) | |
Construct an anonymous property from a value. More... | |
template<typename T = StorageType, typename = typename std::enable_if<!std::is_reference<T>::value>::type> | |
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... | |
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) |
Public Member Functions inherited from Gaudi::Details::PropertyBase | |
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, typename std::remove_reference< T >::type > |
helper typedefs for SFINAE More... | |
template<class T > | |
using | not_copying = std::enable_if<!is_this_type< T >::value > |
Private Attributes | |
StorageType | m_value |
Storage. More... | |
VerifierType | m_verifier |
HandlersType | m_handlers |
Additional Inherited Members | |
Protected Member Functions inherited from Gaudi::Details::PropertyBase | |
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 319 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::HandlersType = HANDLERS |
Definition at line 327 of file Property.h.
|
private |
helper typedefs for SFINAE
Definition at line 337 of file Property.h.
|
private |
Definition at line 339 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::StorageType = TYPE |
Hosted type.
Definition at line 324 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::ValueType = typename std::remove_reference<StorageType>::type |
Definition at line 325 of file Property.h.
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::VerifierType = VERIFIER |
Definition at line 326 of file Property.h.
|
inline |
the constructor with property name, value and documentation.
Definition at line 345 of file Property.h.
|
inline |
Autodeclaring constructor with property name, value and documentation.
Definition at line 356 of file Property.h.
|
inline |
Autodeclaring constructor with property name, value and documentation.
Definition at line 366 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 377 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 384 of file Property.h.
|
inlineoverridevirtual |
get the value from another property
Implements Gaudi::Details::PropertyBase.
Definition at line 631 of file Property.h.
|
inlineoverridevirtual |
clones the current property
Implements Gaudi::Details::PropertyBase.
Definition at line 491 of file Property.h.
|
inlineoverridevirtual |
set new callback for reading
Implements Gaudi::Details::PropertyBase.
Definition at line 392 of file Property.h.
|
inlineoverridevirtual |
set new callback for update
Implements Gaudi::Details::PropertyBase.
Definition at line 398 of file Property.h.
|
inlineoverridevirtual |
string -> value
Implements Gaudi::Details::PropertyBase.
Definition at line 650 of file Property.h.
|
inlineoverridevirtual |
set value to another property
Implements Gaudi::Details::PropertyBase.
Definition at line 644 of file Property.h.
|
inline |
|
inline |
|
inline |
Definition at line 563 of file Property.h.
|
inline |
Definition at line 569 of file Property.h.
|
inline |
Definition at line 585 of file Property.h.
|
inline |
Definition at line 574 of file Property.h.
|
inline |
Definition at line 580 of file Property.h.
|
inline |
Definition at line 591 of file Property.h.
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
get a reference to the readCallBack
Implements Gaudi::Details::PropertyBase.
Definition at line 405 of file Property.h.
|
inline |
Definition at line 486 of file Property.h.
|
inline |
Definition at line 481 of file Property.h.
|
inlineoverridevirtual |
value -> stream
Implements Gaudi::Details::PropertyBase.
Definition at line 663 of file Property.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
get a reference to the updateCallBack
Implements Gaudi::Details::PropertyBase.
Definition at line 410 of file Property.h.
|
inlineoverridevirtual |
manual trigger for callback for update
Implements Gaudi::Details::PropertyBase.
Definition at line 416 of file Property.h.
|
inline |
|
inline |
Definition at line 480 of file Property.h.
|
inline |
|
inline |
|
private |
Definition at line 333 of file Property.h.
|
private |
Storage.
Definition at line 331 of file Property.h.
|
private |
Definition at line 332 of file Property.h.