The Gaudi Framework  v33r0 (d5ea422b)
Gaudi::Property< TYPE, VERIFIER, HANDLERS > Class Template Reference

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

#include <GaudiKernel/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. 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<typename OWNER , typename T = ValueType, typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>, typename = std::enable_if_t<std::is_default_constructible_v<T>>>
 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="", std::string semantics="")
 Autodeclaring constructor with property name, value and documentation. More...
 
template<class OWNER , class T = StorageType, typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
 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<class OWNER , class T = StorageType, typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
 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<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, void(OWNER::*handler)(), std::string doc="", std::string semantics="")
 Autodeclaring constructor with property name, value, pointer to member function updateHandler and documentation. More...
 
template<class OWNER , class T = StorageType, typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
 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 , 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_v<T>>>
 Property ()
 Construct an anonymous property with default constructed value. More...
 
Details::PropertyBasedeclareReadHandler (std::function< void(Details::PropertyBase &)> fun) override
 set new callback for reading More...
 
Details::PropertyBasedeclareUpdateHandler (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, typename = std::enable_if_t<std::is_constructible_v<std::string_view, Dummy>>>
 operator std::string_view () const
 
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>
Propertyoperator= (T &&v)
 Assignment from value. More...
 
const VerifierTypeverifier () const
 Accessor to verifier. More...
 
VerifierTypeverifier ()
 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 ValueTypevalue () const
 Backward compatibility (. More...
 
ValueTypevalue ()
 
bool setValue (const ValueType &v)
 
bool set (const ValueType &v)
 
Details::PropertyBaseclone () 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>
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)
 
- Public Member Functions inherited from Gaudi::Details::PropertyBase
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_infotype_info () const
 property type-info More...
 
std::string type () const
 property type More...
 
template<class HT >
PropertyBasedeclareReadHandler (void(HT::*MF)(PropertyBase &), HT *instance)
 
template<class HT >
PropertyBasedeclareUpdateHandler (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...
 
void setSemantics (std::string value)
 set the semantics string More...
 
virtual std::ostreamfillStream (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_infoownerType () 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 Attributes

StorageType m_value
 Storage. More...
 
VerifierType m_verifier
 
HandlersType m_handlers
 
template<class T >
using not_copying = std::enable_if_t<!is_this_type_v< T > >
 
template<class T >
static constexpr bool is_this_type_v = std::is_same_v<Property, std::remove_reference_t<T>>
 helper typedefs for SFINAE More...
 

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 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...
 
PropertyBaseoperator= (const PropertyBase &)=default
 assignment operator More...
 

Detailed Description

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
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 370 of file Property.h.

Member Typedef Documentation

◆ HandlersType

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

Definition at line 377 of file Property.h.

◆ not_copying

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
template<class T >
using Gaudi::Property< TYPE, VERIFIER, HANDLERS >::not_copying = std::enable_if_t<!is_this_type_v<T> >
private

Definition at line 390 of file Property.h.

◆ StorageType

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

Hosted type.

Definition at line 374 of file Property.h.

◆ ValueType

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

Definition at line 375 of file Property.h.

◆ VerifierType

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

Definition at line 376 of file Property.h.

Constructor & Destructor Documentation

◆ Property() [1/9]

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
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 396 of file Property.h.

397  : Details::PropertyBase( typeid( ValueType ), std::move( name ), std::move( doc ), std::move( semantics ) )
398  , m_value( std::forward<T>( value ) ) {
399  m_verifier( m_value );
400  }
StorageType m_value
Storage.
Definition: Property.h:382
const std::string name() const
property name
Definition: Property.h:46
typename std::remove_reference< StorageType >::type ValueType
Definition: Property.h:375
std::string semantics() const
property semantics
Definition: Property.h:50
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:554
T move(T... args)
VerifierType m_verifier
Definition: Property.h:383

◆ Property() [2/9]

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
template<typename OWNER , typename T = ValueType, typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>, typename = std::enable_if_t<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 std::enable_if is required to avoid ambiguities

Definition at line 405 of file Property.h.

405  : Property( std::move( name ), ValueType{}, "" ) {
406  owner->declareProperty( *this );
407  setOwnerType<OWNER>();
408  }
const std::string name() const
property name
Definition: Property.h:46
Property()
Construct an anonymous property with default constructed value.
Definition: Property.h:466
typename std::remove_reference< StorageType >::type ValueType
Definition: Property.h:375
T move(T... args)

◆ Property() [3/9]

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
template<class OWNER , class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
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 std::enable_if is required to avoid ambiguities

Definition at line 413 of file Property.h.

414  : Property( std::move( name ), std::forward<T>( value ), std::move( doc ), std::move( semantics ) ) {
415  owner->declareProperty( *this );
416  setOwnerType<OWNER>();
417  }
const std::string name() const
property name
Definition: Property.h:46
Property()
Construct an anonymous property with default constructed value.
Definition: Property.h:466
std::string semantics() const
property semantics
Definition: Property.h:50
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:554
T move(T... args)

◆ Property() [4/9]

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
template<class OWNER , class T = StorageType, typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
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 std::enable_if is required to avoid ambiguities

Definition at line 422 of file Property.h.

424  : Property( owner, std::move( name ), std::forward<T>( value ), std::move( doc ), std::move( semantics ) ) {
425  declareUpdateHandler( std::move( handler ) );
426  }
const std::string name() const
property name
Definition: Property.h:46
Details::PropertyBase & declareUpdateHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for update
Definition: Property.h:477
Property()
Construct an anonymous property with default constructed value.
Definition: Property.h:466
std::string semantics() const
property semantics
Definition: Property.h:50
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:554
T move(T... args)

◆ Property() [5/9]

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

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

Note
the use std::enable_if is required to avoid ambiguities

Definition at line 431 of file Property.h.

433  : Property(
434  owner, std::move( name ), std::forward<T>( value ),
435  [owner, handler]( PropertyBase& p ) { ( owner->*handler )( p ); }, std::move( doc ),
436  std::move( semantics ) ) {}
const std::string name() const
property name
Definition: Property.h:46
Property()
Construct an anonymous property with default constructed value.
Definition: Property.h:466
std::string semantics() const
property semantics
Definition: Property.h:50
PropertyBase(const std::type_info &type, std::string name="", std::string doc="", std::string semantics="")
constructor from the property name and the type
Definition: Property.h:125
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:554
T move(T... args)

◆ Property() [6/9]

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
template<class OWNER , class T = StorageType, typename = std::enable_if_t<std::is_base_of<IProperty, OWNER>::value>>
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 std::enable_if is required to avoid ambiguities

Definition at line 440 of file Property.h.

442  : Property(
443  owner, std::move( name ), std::forward<T>( value ),
444  [owner, handler]( PropertyBase& ) { ( owner->*handler )(); }, std::move( doc ), std::move( semantics ) ) {
445  }
const std::string name() const
property name
Definition: Property.h:46
Property()
Construct an anonymous property with default constructed value.
Definition: Property.h:466
std::string semantics() const
property semantics
Definition: Property.h:50
PropertyBase(const std::type_info &type, std::string name="", std::string doc="", std::string semantics="")
constructor from the property name and the type
Definition: Property.h:125
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:554
T move(T... args)

◆ Property() [7/9]

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
template<class OWNER , class T = StorageType, typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
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 std::enable_if is required to avoid ambiguities

Definition at line 450 of file Property.h.

452  : Property( owner, std::move( name ), std::forward<T>( value ), std::move( handler ), std::move( doc ),
453  std::move( semantics ) ) {
454  if ( invoke ) useUpdateHandler();
455  }
bool useUpdateHandler() override
manual trigger for callback for update
Definition: Property.h:492
const std::string name() const
property name
Definition: Property.h:46
Property()
Construct an anonymous property with default constructed value.
Definition: Property.h:466
std::string semantics() const
property semantics
Definition: Property.h:50
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:554
T move(T... args)

◆ Property() [8/9]

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
template<typename T , typename = not_copying<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 461 of file Property.h.

461 : Details::PropertyBase( typeid( ValueType ), "", "" ), m_value( std::forward<T>( v ) ) {}
StorageType m_value
Storage.
Definition: Property.h:382
typename std::remove_reference< StorageType >::type ValueType
Definition: Property.h:375

◆ Property() [9/9]

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
template<typename T = StorageType, typename = std::enable_if_t<!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 466 of file Property.h.

466 : Details::PropertyBase( typeid( ValueType ), "", "" ), m_value() {}
StorageType m_value
Storage.
Definition: Property.h:382
typename std::remove_reference< StorageType >::type ValueType
Definition: Property.h:375

Member Function Documentation

◆ assign()

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
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 687 of file Property.h.

687  {
688  // Check if the property of is of "the same" type, except for strings
689  const Property* p =
690  ( std::is_same_v<ValueType, std::string> ) ? nullptr : dynamic_cast<const Property*>( &source );
691  if ( p ) {
692  *this = p->value();
693  } else {
694  this->fromString( source.toString() ).ignore();
695  }
696  return true;
697  }
Gaudi::Details::PropertyBase Property
\fixme backward compatibility hack for old Property base class
Definition: PropertyFwd.h:35
StatusCode fromString(const std::string &source) override
string -> value
Definition: Property.h:704

◆ clone()

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

clones the current property

Implements Gaudi::Details::PropertyBase.

Definition at line 564 of file Property.h.

564 { return new Property( *this ); }
Property()
Construct an anonymous property with default constructed value.
Definition: Property.h:466

◆ declareReadHandler()

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

set new callback for reading

Implements Gaudi::Details::PropertyBase.

Definition at line 472 of file Property.h.

472  {
473  m_handlers.setReadHandler( std::move( fun ) );
474  return *this;
475  }
HandlersType m_handlers
Definition: Property.h:384
T move(T... args)

◆ declareUpdateHandler()

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

set new callback for update

Implements Gaudi::Details::PropertyBase.

Definition at line 477 of file Property.h.

477  {
478  m_handlers.setUpdateHandler( std::move( fun ) );
479  return *this;
480  }
HandlersType m_handlers
Definition: Property.h:384
T move(T... args)

◆ fromString()

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

string -> value

Implements Gaudi::Details::PropertyBase.

Definition at line 704 of file Property.h.

704  {
705  using Converter = Details::Property::StringConverter<ValueType>;
706  *this = Converter().fromString( m_value, source );
707  return StatusCode::SUCCESS;
708  }
constexpr static const auto SUCCESS
Definition: StatusCode.h:96
StorageType m_value
Storage.
Definition: Property.h:382
Converter base class.
Definition: Converter.h:34

◆ load()

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

set value to another property

Implements Gaudi::Details::PropertyBase.

Definition at line 699 of file Property.h.

699  {
700  // delegate to the 'opposite' method
701  return dest.assign( *this );
702  }

◆ operator const ValueType &()

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

Automatic conversion to value (const reference).

Definition at line 498 of file Property.h.

498  {
499  m_handlers.useReadHandler( *this );
500  return m_value;
501  }
HandlersType m_handlers
Definition: Property.h:384
StorageType m_value
Storage.
Definition: Property.h:382

◆ operator std::string_view()

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

Definition at line 509 of file Property.h.

509  {
510  m_handlers.useReadHandler( *this );
511  return m_value;
512  }
HandlersType m_handlers
Definition: Property.h:384
StorageType m_value
Storage.
Definition: Property.h:382

◆ operator!=()

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

inequality comparison

Definition at line 522 of file Property.h.

522  {
523  return m_value != other;
524  }
StorageType m_value
Storage.
Definition: Property.h:382

◆ operator()()

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
template<class... Args>
decltype( Gaudi::Property< TYPE, VERIFIER, HANDLERS >::operator() ( Args &&...  args) const
inlinenoexcept

Definition at line 680 of file Property.h.

681  {
682  return value()( std::forward<Args>( args )... );
683  }
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:554

◆ operator++() [1/2]

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

Definition at line 623 of file Property.h.

623  {
624  ++value();
625  return *this;
626  }
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:554

◆ operator++() [2/2]

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

Definition at line 628 of file Property.h.

628  {
629  return m_value++;
630  }
StorageType m_value
Storage.
Definition: Property.h:382

◆ operator+=()

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

Definition at line 641 of file Property.h.

641  {
642  m_value += other;
643  return *this;
644  }
StorageType m_value
Storage.
Definition: Property.h:382

◆ operator--() [1/2]

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

Definition at line 632 of file Property.h.

632  {
633  --value();
634  return *this;
635  }
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:554

◆ operator--() [2/2]

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

Definition at line 637 of file Property.h.

637  {
638  return m_value--;
639  }
StorageType m_value
Storage.
Definition: Property.h:382

◆ operator-=()

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

Definition at line 646 of file Property.h.

646  {
647  m_value -= other;
648  return *this;
649  }
StorageType m_value
Storage.
Definition: Property.h:382

◆ operator<()

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

"less" comparison

Definition at line 528 of file Property.h.

528  {
529  return m_value < other;
530  }
StorageType m_value
Storage.
Definition: Property.h:382

◆ operator=()

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

Assignment from value.

Definition at line 540 of file Property.h.

540  {
541  m_verifier( v );
542  m_value = std::forward<T>( v );
543  m_handlers.useUpdateHandler( *this );
544  return *this;
545  }
HandlersType m_handlers
Definition: Property.h:384
StorageType m_value
Storage.
Definition: Property.h:382
VerifierType m_verifier
Definition: Property.h:383

◆ operator==()

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

equality comparison

Definition at line 516 of file Property.h.

516  {
517  return m_value == other;
518  }
StorageType m_value
Storage.
Definition: Property.h:382

◆ readCallBack()

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
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 483 of file Property.h.

483  {
484  return m_handlers.getReadHandler();
485  }
HandlersType m_handlers
Definition: Property.h:384

◆ set()

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::set ( const ValueType v)
inline

Definition at line 560 of file Property.h.

560  {
561  *this = v;
562  return true;
563  }

◆ setValue()

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::setValue ( const ValueType v)
inline

Definition at line 556 of file Property.h.

556  {
557  *this = v;
558  return true;
559  }

◆ toStream()

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

value -> stream

Implements Gaudi::Details::PropertyBase.

Definition at line 715 of file Property.h.

715  {
716  m_handlers.useReadHandler( *this );
717  using Utils::toStream;
718  toStream( m_value, out );
719  }
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:291
HandlersType m_handlers
Definition: Property.h:384
StorageType m_value
Storage.
Definition: Property.h:382
void toStream(std::ostream &out) const override
value -> stream
Definition: Property.h:715

◆ toString()

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

value -> string

Implements Gaudi::Details::PropertyBase.

Definition at line 710 of file Property.h.

710  {
711  using Converter = Details::Property::StringConverter<ValueType>;
712  return Converter().toString( *this );
713  }
Converter base class.
Definition: Converter.h:34

◆ updateCallBack()

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
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 487 of file Property.h.

487  {
488  return m_handlers.getUpdateHandler();
489  }
HandlersType m_handlers
Definition: Property.h:384

◆ useUpdateHandler()

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

manual trigger for callback for update

Implements Gaudi::Details::PropertyBase.

Definition at line 492 of file Property.h.

492  {
493  m_handlers.useUpdateHandler( *this );
494  return true;
495  }
HandlersType m_handlers
Definition: Property.h:384

◆ value() [1/2]

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

Backward compatibility (.

Deprecated:
will be removed)

Definition at line 554 of file Property.h.

554 { return *this; }

◆ value() [2/2]

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

Definition at line 555 of file Property.h.

555 { return const_cast<ValueType&>( (const ValueType&)*this ); }
typename std::remove_reference< StorageType >::type ValueType
Definition: Property.h:375

◆ verifier() [1/2]

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

Accessor to verifier.

Definition at line 548 of file Property.h.

548 { return m_verifier; }
VerifierType m_verifier
Definition: Property.h:383

◆ verifier() [2/2]

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

Accessor to verifier.

Definition at line 550 of file Property.h.

550 { return m_verifier; }
VerifierType m_verifier
Definition: Property.h:383

Member Data Documentation

◆ is_this_type_v

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
template<class T >
constexpr bool Gaudi::Property< TYPE, VERIFIER, HANDLERS >::is_this_type_v = std::is_same_v<Property, std::remove_reference_t<T>>
inlinestaticprivate

helper typedefs for SFINAE

Definition at line 388 of file Property.h.

◆ m_handlers

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
HandlersType Gaudi::Property< TYPE, VERIFIER, HANDLERS >::m_handlers
private

Definition at line 384 of file Property.h.

◆ m_value

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
StorageType Gaudi::Property< TYPE, VERIFIER, HANDLERS >::m_value
private

Storage.

Definition at line 382 of file Property.h.

◆ m_verifier

template<class TYPE, class VERIFIER = Details::Property::NullVerifier, class HANDLERS = Details::Property::UpdateHandler>
VerifierType Gaudi::Property< TYPE, VERIFIER, HANDLERS >::m_verifier
private

Definition at line 383 of file Property.h.


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