The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
Gaudi::Property< TYPE, VERIFIER, HANDLERS > Class Template Reference

Implementation of property with value of concrete type. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/Property.h>

Inheritance diagram for Gaudi::Property< TYPE, VERIFIER, HANDLERS >:
Collaboration diagram for Gaudi::Property< TYPE, VERIFIER, HANDLERS >:

Public Types

using StorageType = TYPE
 Hosted type.
 
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.
 
template<std::derived_from< IProperty > OWNER, typename T = ValueType>
requires ( std::is_default_constructible_v<T> )
 Property (OWNER *owner, std::string name)
 Autodeclaring constructor with property name, value and documentation.
 
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.
 
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.
 
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.
 
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.
 
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.
 
template<typename T>
requires ( !std::is_same_v<Property, std::remove_reference_t<T>> )
 Property (T &&v)
 Construct an anonymous property from a value.
 
template<typename T = StorageType>
requires ( !std::is_reference_v<T> )
 Property ()
 Construct an anonymous property with default constructed value.
 
Details::PropertyBasedeclareReadHandler (std::function< void(Details::PropertyBase &)> fun) override
 set new callback for reading
 
Details::PropertyBasedeclareUpdateHandler (std::function< void(Details::PropertyBase &)> fun) override
 set new callback for update
 
const std::function< void(Details::PropertyBase &)> readCallBack () const override
 get a reference to the readCallBack
 
const std::function< void(Details::PropertyBase &)> updateCallBack () const override
 get a reference to the updateCallBack
 
bool useUpdateHandler () override
 manual trigger for callback for update
 
 operator const ValueType & () const
 Automatic conversion to value (const reference).
 
template<typename Dummy = TYPE>
requires ( std::is_constructible_v<std::string_view, Dummy> )
 operator std::string_view () const
 
std::ostream & fillStream (std::ostream &stream) const override
 Properly quote string properties when printing them.
 
 operator std::string_view () const
 
template<class T>
bool operator== (const T &other) const
 equality comparison
 
template<class T>
bool operator!= (const T &other) const
 inequality comparison
 
template<class T>
bool operator< (const T &other) const
 "less" comparison
 
template<class T>
decltype(auto) operator+ (const T &other) const
 allow addition if possible between the property and the other types
 
template<class T = ValueType>
Propertyoperator= (T &&v)
 Assignment from value.
 
const VerifierTypeverifier () const
 Accessor to verifier.
 
VerifierTypeverifier ()
 Accessor to verifier.
 
template<class... Args>
decltype(std::declval< ValueType >()(std::declval< Args && >()...)) operator() (Args &&... args) const noexcept(noexcept(std::declval< ValueType >()(std::declval< Args && >()...)))
 
bool assign (const Details::PropertyBase &source) override
 get the value from another property
 
bool load (Details::PropertyBase &dest) const override
 set value to another property
 
StatusCode fromString (const std::string &source) override
 string -> value
 
std::string toString () const override
 value -> string
 
void toStream (std::ostream &out) const override
 value -> stream
 
virtual PropertyBasedeclareReadHandler (std::function< void(PropertyBase &)> fun)=0
 set new callback for reading
 
template<class HT>
PropertyBasedeclareReadHandler (void(HT::*MF)(PropertyBase &), HT *instance)
 
virtual PropertyBasedeclareUpdateHandler (std::function< void(PropertyBase &)> fun)=0
 set new callback for update
 
template<class HT>
PropertyBasedeclareUpdateHandler (void(HT::*MF)(PropertyBase &), HT *instance)
 
const ValueTypevalue () const
 
ValueTypevalue ()
 
bool setValue (const ValueType &v)
 
bool set (const ValueType &v)
 
Details::PropertyBaseclone () const override
 clones the current property
 
Helpers for easy use of string and vector properties.

They are instantiated only if they are implemented in the wrapped class.

template<class T = const ValueType>
decltype(auto) size () const
 
template<class T = const ValueType, typename = decltype( std::declval<const T>().length() )>
decltype(auto) length () const
 
template<class T = const ValueType>
decltype(auto) empty () const
 
template<class T = ValueType>
decltype(auto) clear ()
 
template<class T = const ValueType, typename = decltype( std::declval<const T>().begin() )>
decltype(auto) begin () const
 
template<class T = const ValueType>
decltype(auto) end () const
 
template<class T = ValueType, typename = decltype( std::declval<T>().begin() )>
decltype(auto) begin ()
 
template<class T = ValueType>
decltype(auto) end ()
 
template<class ARG>
decltype(auto) operator[] (const ARG &arg) const
 
template<class ARG>
decltype(auto) operator[] (const ARG &arg)
 
template<class T = const ValueType>
decltype(auto) find (const typename T::key_type &key) const
 
template<class T = ValueType>
decltype(auto) find (const typename T::key_type &key)
 
template<class ARG, class T = ValueType>
decltype(auto) erase (ARG arg)
 
template<class = ValueType>
Propertyoperator++ ()
 
template<class = ValueType>
ValueType operator++ (int)
 
template<class = ValueType>
Propertyoperator-- ()
 
template<class = ValueType>
ValueType operator-- (int)
 
template<class T = ValueType>
Propertyoperator+= (const T &other)
 
template<class T = ValueType>
Propertyoperator-= (const T &other)
 
template<class T = const ValueType>
decltype(auto) key () const
 Helpers for DataHandles and derived classes.
 
template<class T = const ValueType>
decltype(auto) objKey () const
 
template<class T = const ValueType>
decltype(auto) fullKey () const
 
template<class T = ValueType>
decltype(auto) initialize ()
 
template<class T = ValueType>
decltype(auto) makeHandles () const
 
template<class ARG, class T = ValueType>
decltype(auto) makeHandles (const ARG &arg) const
 
- Public Member Functions inherited from Gaudi::Details::PropertyBase
const std::string name () const
 property name
 
std::string documentation () const
 property documentation
 
std::string semantics () const
 property semantics
 
const std::type_info * type_info () const
 property type-info
 
std::string type () const
 property type
 
template<class HT>
PropertyBasedeclareReadHandler (void(HT::*MF)(PropertyBase &), HT *instance)
 
template<class HT>
PropertyBasedeclareUpdateHandler (void(HT::*MF)(PropertyBase &), HT *instance)
 
virtual ~PropertyBase ()
 virtual destructor
 
void setName (std::string value)
 set the new value for the property name
 
void setDocumentation (std::string value)
 set the documentation string
 
void setSemantics (std::string value)
 set the semantics string
 
void setOwnerType (const std::type_info &ownerType)
 set the type of the owner class (used for documentation)
 
template<class OWNER>
void setOwnerType ()
 set the type of the owner class (used for documentation)
 
const std::type_info * ownerType () const
 get the type of the owner class (used for documentation)
 
std::string ownerTypeName () const
 get the string for the type of the owner class (used for documentation)
 

Private Attributes

StorageType m_value
 
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="", std::string semantics="")
 constructor from the property name and the type
 
 PropertyBase (std::string name, const std::type_info &type)
 constructor from the property name and the type
 
 PropertyBase (const PropertyBase &)=default
 copy constructor
 
PropertyBaseoperator= (const PropertyBase &)=default
 assignment operator
 

Detailed Description

template<class TYPE, class VERIFIER, class HANDLERS>
class Gaudi::Property< TYPE, VERIFIER, HANDLERS >

Implementation of property with value of concrete type.

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-02-27
Author
Marco Clemencic
Date
2016-06-16

Definition at line 27 of file PropertyFwd.h.

Member Typedef Documentation

◆ HandlersType

template<class TYPE, class VERIFIER, class HANDLERS>
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::HandlersType = HANDLERS

Definition at line 41 of file Property.h.

◆ StorageType

template<class TYPE, class VERIFIER, class HANDLERS>
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::StorageType = TYPE

Hosted type.

Definition at line 38 of file Property.h.

◆ ValueType

template<class TYPE, class VERIFIER, class HANDLERS>
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::ValueType = typename std::remove_reference<StorageType>::type

Definition at line 39 of file Property.h.

◆ VerifierType

template<class TYPE, class VERIFIER, class HANDLERS>
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::VerifierType = VERIFIER

Definition at line 40 of file Property.h.

Constructor & Destructor Documentation

◆ Property() [1/9]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = StorageType>
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::Property ( std::string name,
T && value,
std::string doc = "",
std::string semantics = "" )
inline

the constructor with property name, value and documentation.

Definition at line 51 of file Property.h.

55 }
std::string semantics() const
property semantics
const std::string name() const
property name
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
StorageType m_value
Definition Property.h:44
const ValueType & value() const
Definition Property.h:229
VerifierType m_verifier
Definition Property.h:45
typename std::remove_reference< StorageType >::type ValueType
Definition Property.h:39

◆ Property() [2/9]

template<class TYPE, class VERIFIER, class HANDLERS>
template<std::derived_from< IProperty > OWNER, typename T = ValueType>
requires ( std::is_default_constructible_v<T> )
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::Property ( OWNER * owner,
std::string name )
inline

Autodeclaring constructor with property name, value and documentation.

Note
the use of requires is required to avoid ambiguities

Definition at line 60 of file Property.h.

60 : Property( std::move( name ), ValueType{}, "" ) {
61 owner->declareProperty( *this );
63 }
void setOwnerType()
set the type of the owner class (used for documentation)
Property()
Construct an anonymous property with default constructed value.
Definition Property.h:124

◆ Property() [3/9]

template<class TYPE, class VERIFIER, class HANDLERS>
template<std::derived_from< IProperty > OWNER, class T = StorageType>
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::Property ( OWNER * owner,
std::string name,
T && value,
std::string doc = "",
std::string semantics = "" )
inline

Autodeclaring constructor with property name, value and documentation.

Note
the use of requires is required to avoid ambiguities

Definition at line 68 of file Property.h.

70 owner->declareProperty( *this );
72 }

◆ Property() [4/9]

template<class TYPE, class VERIFIER, class HANDLERS>
template<std::derived_from< IProperty > OWNER, class T = StorageType>
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::Property ( OWNER * owner,
std::string name,
T && value,
std::function< void(PropertyBase &)> handler,
std::string doc = "",
std::string semantics = "" )
inline

Autodeclaring constructor with property name, value, updateHandler and documentation.

Note
the use of requires is required to avoid ambiguities

Definition at line 77 of file Property.h.

81 }
Details::PropertyBase & declareUpdateHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for update
Definition Property.h:135

◆ Property() [5/9]

template<class TYPE, class VERIFIER, class HANDLERS>
template<std::derived_from< IProperty > OWNER, class T = StorageType>
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::Property ( OWNER * owner,
std::string name,
T && value,
void(OWNER::* handler )(PropertyBase &),
std::string doc = "",
std::string semantics = "" )
inline

Autodeclaring constructor with property name, value, pointer to member function updateHandler and documentation.

Note
the use of requires is required to avoid ambiguities

Definition at line 86 of file Property.h.

88 : Property(
90 [owner, handler]( PropertyBase& p ) { ( owner->*handler )( p ); }, std::move( doc ),
91 std::move( semantics ) ) {}
PropertyBase(const std::type_info &type, std::string name="", std::string doc="", std::string semantics="")
constructor from the property name and the type

◆ Property() [6/9]

template<class TYPE, class VERIFIER, class HANDLERS>
template<std::derived_from< IProperty > OWNER, class T = StorageType>
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::Property ( OWNER * owner,
std::string name,
T && value,
void(OWNER::* handler )(),
std::string doc = "",
std::string semantics = "" )
inline

Autodeclaring constructor with property name, value, pointer to member function updateHandler and documentation.

Note
the use of requires is required to avoid ambiguities

Definition at line 95 of file Property.h.

97 : Property(
99 [owner, handler]( PropertyBase& ) { ( owner->*handler )(); }, std::move( doc ), std::move( semantics ) ) {
100 }

◆ Property() [7/9]

template<class TYPE, class VERIFIER, class HANDLERS>
template<std::derived_from< IProperty > OWNER, class T = StorageType>
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::Property ( OWNER * owner,
std::string name,
T && value,
std::function< void(PropertyBase &)> handler,
Details::Property< TYPE, VERIFIER, HANDLERS >::ImmediatelyInvokeHandler invoke,
std::string doc = "",
std::string semantics = "" )
inline

Autodeclaring constructor with property name, value, updateHandler and documentation.

Note
the use of requires is required to avoid ambiguities

Definition at line 105 of file Property.h.

108 std::move( semantics ) ) {
109 if ( invoke ) useUpdateHandler();
110 }
bool useUpdateHandler() override
manual trigger for callback for update
Definition Property.h:150

◆ Property() [8/9]

template<class TYPE, class VERIFIER, class HANDLERS>
template<typename T>
requires ( !std::is_same_v<Property, std::remove_reference_t<T>> )
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::Property ( T && v)
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 117 of file Property.h.

118 : Details::PropertyBase( typeid( ValueType ), "", "", "" ), m_value( std::forward<T>( v ) ) {}

◆ Property() [9/9]

template<class TYPE, class VERIFIER, class HANDLERS>
template<typename T = StorageType>
requires ( !std::is_reference_v<T> )
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::Property ( )
inline

Construct an anonymous property with default constructed value.

Can be used only if StorageType is default constructible.

Definition at line 124 of file Property.h.

124: Details::PropertyBase( typeid( ValueType ), "", "", "" ), m_value() {}

Member Function Documentation

◆ assign()

template<class TYPE, class VERIFIER, class HANDLERS>
bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::assign ( const Details::PropertyBase & source)
inlineoverridevirtual

get the value from another property

Implements Gaudi::Details::PropertyBase.

Definition at line 361 of file Property.h.

361 {
362 // Check if the property is of "the same" type, except for strings
363 const Property* p =
365 if ( p ) {
366 *this = p->value();
367 } else {
368 return this->fromString( source.toString() ).isSuccess();
369 }
370 return true;
371 }
Property(std::string name, T &&value, std::string doc="", std::string semantics="")
the constructor with property name, value and documentation.
Definition Property.h:51
std::string toString() const override
value -> string
Definition Property.h:406
StatusCode fromString(const std::string &source) override
string -> value
Definition Property.h:378
bool isSuccess() const
Definition StatusCode.h:314

◆ begin() [1/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = ValueType, typename = decltype( std::declval<T>().begin() )>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::begin ( )
inline

Definition at line 270 of file Property.h.

270 {
271 return value().begin();
272 }

◆ begin() [2/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = const ValueType, typename = decltype( std::declval<const T>().begin() )>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::begin ( ) const
inline

Definition at line 262 of file Property.h.

262 {
263 return value().begin();
264 }

◆ clear()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::clear ( )
inline

Definition at line 258 of file Property.h.

258 {
259 value().clear();
260 }

◆ clone()

template<class TYPE, class VERIFIER, class HANDLERS>
Details::PropertyBase * Gaudi::Property< TYPE, VERIFIER, HANDLERS >::clone ( ) const
inlineoverridevirtual

clones the current property

Implements Gaudi::Details::PropertyBase.

Definition at line 239 of file Property.h.

239{ return new Property( *this ); }

◆ declareReadHandler() [1/3]

template<class TYPE, class VERIFIER, class HANDLERS>
Details::PropertyBase & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::declareReadHandler ( std::function< void(Details::PropertyBase &)> fun)
inlineoverride

set new callback for reading

Definition at line 130 of file Property.h.

130 {
131 m_handlers.setReadHandler( std::move( fun ) );
132 return *this;
133 }
HandlersType m_handlers
Definition Property.h:46

◆ declareReadHandler() [2/3]

template<class TYPE, class VERIFIER, class HANDLERS>
virtual PropertyBase & Gaudi::Details::PropertyBase::declareReadHandler ( std::function< void(PropertyBase &)> fun)
virtual

set new callback for reading

Implements Gaudi::Details::PropertyBase.

◆ declareReadHandler() [3/3]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class HT>
PropertyBase & Gaudi::Details::PropertyBase::declareReadHandler ( void(HT::* MF )(PropertyBase &),
HT * instance )
inline

Definition at line 75 of file PropertyBase.h.

75 {
76 return declareReadHandler( [=]( PropertyBase& p ) { ( instance->*MF )( p ); } );
77 }
Details::PropertyBase & declareReadHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for reading
Definition Property.h:130

◆ declareUpdateHandler() [1/3]

template<class TYPE, class VERIFIER, class HANDLERS>
Details::PropertyBase & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::declareUpdateHandler ( std::function< void(Details::PropertyBase &)> fun)
inlineoverride

set new callback for update

Definition at line 135 of file Property.h.

135 {
136 m_handlers.setUpdateHandler( std::move( fun ) );
137 return *this;
138 }

◆ declareUpdateHandler() [2/3]

template<class TYPE, class VERIFIER, class HANDLERS>
virtual PropertyBase & Gaudi::Details::PropertyBase::declareUpdateHandler ( std::function< void(PropertyBase &)> fun)
virtual

set new callback for update

Implements Gaudi::Details::PropertyBase.

◆ declareUpdateHandler() [3/3]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class HT>
PropertyBase & Gaudi::Details::PropertyBase::declareUpdateHandler ( void(HT::* MF )(PropertyBase &),
HT * instance )
inline

Definition at line 80 of file PropertyBase.h.

80 {
81 return declareUpdateHandler( [=]( PropertyBase& p ) { ( instance->*MF )( p ); } );
82 }

◆ empty()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = const ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::empty ( ) const
inline

Definition at line 254 of file Property.h.

254 {
255 return value().empty();
256 }

◆ end() [1/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::end ( )
inline

Definition at line 274 of file Property.h.

274 {
275 return value().end();
276 }

◆ end() [2/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = const ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::end ( ) const
inline

Definition at line 266 of file Property.h.

266 {
267 return value().end();
268 }

◆ erase()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class ARG, class T = ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::erase ( ARG arg)
inline

Definition at line 294 of file Property.h.

294 {
295 return value().erase( arg );
296 }

◆ fillStream()

template<class TYPE, class VERIFIER, class HANDLERS>
std::ostream & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::fillStream ( std::ostream & stream) const
inlineoverridevirtual

Properly quote string properties when printing them.

Reimplemented from Gaudi::Details::PropertyBase.

Definition at line 174 of file Property.h.

174 {
175 stream << " '" << name() << "':";
178 toStream( value(), stream );
179 } else {
180 stream << toString();
181 }
182 return stream;
183 }
void toStream(std::ostream &out) const override
value -> stream
Definition Property.h:411

◆ find() [1/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::find ( const typename T::key_type & key)
inline

Definition at line 290 of file Property.h.

290 {
291 return value().find( key );
292 }
decltype(auto) key() const
Helpers for DataHandles and derived classes.
Definition Property.h:327

◆ find() [2/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = const ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::find ( const typename T::key_type & key) const
inline

Definition at line 286 of file Property.h.

286 {
287 return value().find( key );
288 }

◆ fromString()

template<class TYPE, class VERIFIER, class HANDLERS>
StatusCode Gaudi::Property< TYPE, VERIFIER, HANDLERS >::fromString ( const std::string & source)
inlineoverridevirtual

string -> value

Implements Gaudi::Details::PropertyBase.

Definition at line 378 of file Property.h.

378 {
379 try {
381 *this = Converter().fromString( m_value, source );
382 return StatusCode::SUCCESS;
383 } catch ( const std::exception& err ) {
386 const std::string errMsg =
387 "Cannot convert '" + source + "' for property '" + name() + "' in class '" + ownerTypeName() + "'";
388 switch ( parsingErrorPolicy() ) {
390 break;
392 throw GaudiException( errMsg, "Property::fromString", StatusCode::FAILURE, err );
393 break;
395 std::cerr << "WARNING: " << errMsg << "': " << err.what() << '\n';
396 break;
398 std::cerr << "FATAL: " << errMsg << "': " << err.what() << '\n';
399 std::abort();
400 break;
401 }
402 return StatusCode::FAILURE;
403 }
404 }
std::string ownerTypeName() const
get the string for the type of the owner class (used for documentation)

◆ fullKey()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = const ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::fullKey ( ) const
inline

Definition at line 335 of file Property.h.

335 {
336 return value().fullKey();
337 }

◆ initialize()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::initialize ( )
inline

Definition at line 339 of file Property.h.

339 {
340 return value().initialize();
341 }

◆ key()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = const ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::key ( ) const
inline

Helpers for DataHandles and derived classes.

Definition at line 327 of file Property.h.

327 {
328 return value().key();
329 }

◆ length()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = const ValueType, typename = decltype( std::declval<const T>().length() )>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::length ( ) const
inline

Definition at line 250 of file Property.h.

250 {
251 return value().length();
252 }

◆ load()

template<class TYPE, class VERIFIER, class HANDLERS>
bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::load ( Details::PropertyBase & dest) const
inlineoverridevirtual

set value to another property

Implements Gaudi::Details::PropertyBase.

Definition at line 373 of file Property.h.

373 {
374 // delegate to the 'opposite' method
375 return dest.assign( *this );
376 }
bool assign(const Details::PropertyBase &source) override
get the value from another property
Definition Property.h:361

◆ makeHandles() [1/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::makeHandles ( ) const
inline

Definition at line 343 of file Property.h.

343 {
344 return value().makeHandles();
345 }

◆ makeHandles() [2/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class ARG, class T = ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::makeHandles ( const ARG & arg) const
inline

Definition at line 347 of file Property.h.

347 {
348 return value().makeHandles( arg );
349 }

◆ objKey()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = const ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::objKey ( ) const
inline

Definition at line 331 of file Property.h.

331 {
332 return value().objKey();
333 }

◆ operator const ValueType &()

template<class TYPE, class VERIFIER, class HANDLERS>
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator const ValueType & ( ) const
inline

Automatic conversion to value (const reference).

Definition at line 156 of file Property.h.

156 {
157 m_handlers.useReadHandler( *this );
158 return m_value;
159 }

◆ operator std::string_view() [1/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<typename Dummy = TYPE>
requires ( std::is_constructible_v<std::string_view, Dummy> )
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator std::string_view ( ) const
inline

Definition at line 168 of file Property.h.

168 {
169 m_handlers.useReadHandler( *this );
170 return m_value;
171 }

◆ operator std::string_view() [2/2]

template<class TYPE, class VERIFIER, class HANDLERS>
Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator std::string_view ( ) const
inline

Definition at line 185 of file Property.h.

185 {
186 m_handlers.useReadHandler( *this );
187 return m_value;
188 }

◆ operator!=()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T>
bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator!= ( const T & other) const
inline

inequality comparison

Definition at line 198 of file Property.h.

198 {
199 return m_value != other;
200 }

◆ operator()()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class... Args>
decltype(std::declval< ValueType >()(std::declval< Args && >()...)) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator() ( Args &&... args) const
inlinenoexcept

Definition at line 354 of file Property.h.

355 {
356 return value()( std::forward<Args>( args )... );
357 }

◆ operator+()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator+ ( const T & other) const
inline

allow addition if possible between the property and the other types

Definition at line 210 of file Property.h.

210 {
211 return m_value + other;
212 }

◆ operator++() [1/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class = ValueType>
Property & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator++ ( )
inline

Definition at line 298 of file Property.h.

298 {
299 ++value();
300 return *this;
301 }

◆ operator++() [2/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class = ValueType>
ValueType Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator++ ( int )
inline

Definition at line 303 of file Property.h.

303 {
304 return m_value++;
305 }

◆ operator+=()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = ValueType>
Property & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator+= ( const T & other)
inline

Definition at line 316 of file Property.h.

316 {
317 m_value += other;
318 return *this;
319 }

◆ operator--() [1/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class = ValueType>
Property & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator-- ( )
inline

Definition at line 307 of file Property.h.

307 {
308 --value();
309 return *this;
310 }

◆ operator--() [2/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class = ValueType>
ValueType Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator-- ( int )
inline

Definition at line 312 of file Property.h.

312 {
313 return m_value--;
314 }

◆ operator-=()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = ValueType>
Property & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator-= ( const T & other)
inline

Definition at line 321 of file Property.h.

321 {
322 m_value -= other;
323 return *this;
324 }

◆ operator<()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T>
bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator< ( const T & other) const
inline

"less" comparison

Definition at line 204 of file Property.h.

204 {
205 return m_value < other;
206 }

◆ operator=()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = ValueType>
Property & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator= ( T && v)
inline

Assignment from value.

Definition at line 216 of file Property.h.

216 {
217 m_verifier( v );
219 m_handlers.useUpdateHandler( *this );
220 return *this;
221 }

◆ operator==()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T>
bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator== ( const T & other) const
inline

equality comparison

Definition at line 192 of file Property.h.

192 {
193 return m_value == other;
194 }

◆ operator[]() [1/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class ARG>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator[] ( const ARG & arg)
inline

Definition at line 282 of file Property.h.

282 {
283 return value()[arg];
284 }

◆ operator[]() [2/2]

template<class TYPE, class VERIFIER, class HANDLERS>
template<class ARG>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator[] ( const ARG & arg) const
inline

Definition at line 278 of file Property.h.

278 {
279 return value()[arg];
280 }

◆ readCallBack()

template<class TYPE, class VERIFIER, class HANDLERS>
const std::function< void(Details::PropertyBase &)> Gaudi::Property< TYPE, VERIFIER, HANDLERS >::readCallBack ( ) const
inlineoverridevirtual

get a reference to the readCallBack

Implements Gaudi::Details::PropertyBase.

Definition at line 141 of file Property.h.

141 {
142 return m_handlers.getReadHandler();
143 }

◆ set()

template<class TYPE, class VERIFIER, class HANDLERS>
bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::set ( const ValueType & v)
inline

Definition at line 235 of file Property.h.

235 {
236 *this = v;
237 return true;
238 }

◆ setValue()

template<class TYPE, class VERIFIER, class HANDLERS>
bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::setValue ( const ValueType & v)
inline

Definition at line 231 of file Property.h.

231 {
232 *this = v;
233 return true;
234 }

◆ size()

template<class TYPE, class VERIFIER, class HANDLERS>
template<class T = const ValueType>
decltype(auto) Gaudi::Property< TYPE, VERIFIER, HANDLERS >::size ( ) const
inline

Definition at line 246 of file Property.h.

246 {
247 return value().size();
248 }

◆ toStream()

template<class TYPE, class VERIFIER, class HANDLERS>
void Gaudi::Property< TYPE, VERIFIER, HANDLERS >::toStream ( std::ostream & out) const
inlineoverridevirtual

value -> stream

Implements Gaudi::Details::PropertyBase.

Definition at line 411 of file Property.h.

411 {
412 m_handlers.useReadHandler( *this );
413 using Utils::toStream;
414 toStream( m_value, out );
415 }

◆ toString()

template<class TYPE, class VERIFIER, class HANDLERS>
std::string Gaudi::Property< TYPE, VERIFIER, HANDLERS >::toString ( ) const
inlineoverridevirtual

value -> string

Implements Gaudi::Details::PropertyBase.

Definition at line 406 of file Property.h.

406 {
408 return Converter().toString( *this );
409 }

◆ updateCallBack()

template<class TYPE, class VERIFIER, class HANDLERS>
const std::function< void(Details::PropertyBase &)> Gaudi::Property< TYPE, VERIFIER, HANDLERS >::updateCallBack ( ) const
inlineoverridevirtual

get a reference to the updateCallBack

Implements Gaudi::Details::PropertyBase.

Definition at line 145 of file Property.h.

145 {
146 return m_handlers.getUpdateHandler();
147 }

◆ useUpdateHandler()

template<class TYPE, class VERIFIER, class HANDLERS>
bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::useUpdateHandler ( )
inlineoverridevirtual

manual trigger for callback for update

Implements Gaudi::Details::PropertyBase.

Definition at line 150 of file Property.h.

150 {
151 m_handlers.useUpdateHandler( *this );
152 return true;
153 }

◆ value() [1/2]

template<class TYPE, class VERIFIER, class HANDLERS>
ValueType & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::value ( )
inline

Definition at line 230 of file Property.h.

230{ return const_cast<ValueType&>( (const ValueType&)*this ); }

◆ value() [2/2]

template<class TYPE, class VERIFIER, class HANDLERS>
const ValueType & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::value ( ) const
inline

Definition at line 229 of file Property.h.

229{ return *this; }

◆ verifier() [1/2]

template<class TYPE, class VERIFIER, class HANDLERS>
VerifierType & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::verifier ( )
inline

Accessor to verifier.

Definition at line 226 of file Property.h.

226{ return m_verifier; }

◆ verifier() [2/2]

template<class TYPE, class VERIFIER, class HANDLERS>
const VerifierType & Gaudi::Property< TYPE, VERIFIER, HANDLERS >::verifier ( ) const
inline

Accessor to verifier.

Definition at line 224 of file Property.h.

224{ return m_verifier; }

Member Data Documentation

◆ m_handlers

template<class TYPE, class VERIFIER, class HANDLERS>
HandlersType Gaudi::Property< TYPE, VERIFIER, HANDLERS >::m_handlers
private

Definition at line 46 of file Property.h.

◆ m_value

template<class TYPE, class VERIFIER, class HANDLERS>
StorageType Gaudi::Property< TYPE, VERIFIER, HANDLERS >::m_value
private

Definition at line 44 of file Property.h.

◆ m_verifier

template<class TYPE, class VERIFIER, class HANDLERS>
VerifierType Gaudi::Property< TYPE, VERIFIER, HANDLERS >::m_verifier
private

Definition at line 45 of file Property.h.


The documentation for this class was generated from the following files: