Go to the documentation of this file.
   23 #include <string_view> 
   37   template <
class TYPE, 
class VERIFIER = Details::Property::NullVerifier,
 
   38             class HANDLERS = Details::Property::UpdateHandler>
 
   57     static inline constexpr 
bool is_this_type_v = std::is_same_v<Property, std::remove_reference_t<T>>;
 
   64     template <
class T = StorageType>
 
   72     template <
typename OWNER, 
typename T = ValueType, 
typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>,
 
   73               typename = std::enable_if_t<std::is_default_constructible_v<T>>>
 
   75       owner->declareProperty( *
this );
 
   76       setOwnerType<OWNER>();
 
   81     template <
class OWNER, 
class T = StorageType, 
typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
 
   84       owner->declareProperty( *
this );
 
   85       setOwnerType<OWNER>();
 
   90     template <
class OWNER, 
class T = StorageType, 
typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
 
   99     template <
class OWNER, 
class T = StorageType, 
typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
 
  108     template <
class OWNER, 
class T = StorageType, 
typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
 
  118     template <
class OWNER, 
class T = StorageType, 
typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
 
  129     template <
typename T, 
typename = not_copying<T>>
 
  134     template <
typename T = StorageType, 
typename = std::enable_if_t<!std::is_reference_v<T>>>
 
  177     template <
typename Dummy = TYPE, 
typename = std::enable_if_t<std::is_constructible_v<std::
string_view, Dummy>>>
 
  178     operator std::string_view()
 const {
 
  186       if constexpr ( std::is_same_v<ValueType, std::string> ) {
 
  195     operator std::string_view()
 const {
 
  220     decltype( 
auto ) operator+( const T& other )
 const {
 
  225     template <
class T = ValueType>
 
  255     template <
class T = const ValueType>
 
  256     decltype( 
auto ) 
size()
 const {
 
  257       return value().size();
 
  259     template <class T = const ValueType, typename = decltype( std::declval<const T>().length() )>
 
  260     decltype( 
auto ) length()
 const {
 
  261       return value().length();
 
  263     template <
class T = const ValueType>
 
  264     decltype( 
auto ) empty()
 const {
 
  265       return value().empty();
 
  267     template <
class T = ValueType>
 
  268     decltype( 
auto ) clear() {
 
  271     template <class T = const ValueType, typename = decltype( std::declval<const T>().begin() )>
 
  272     decltype( 
auto ) 
begin()
 const {
 
  273       return value().begin();
 
  275     template <
class T = const ValueType>
 
  276     decltype( 
auto ) 
end()
 const {
 
  277       return value().end();
 
  279     template <class T = ValueType, typename = decltype( std::declval<T>().begin() )>
 
  280     decltype( 
auto ) 
begin() {
 
  281       return value().begin();
 
  283     template <
class T = ValueType>
 
  284     decltype( 
auto ) 
end() {
 
  285       return value().end();
 
  288     decltype( 
auto ) operator[]( const ARG& arg )
 const {
 
  292     decltype( 
auto ) operator[]( const ARG& arg ) {
 
  295     template <
class T = const ValueType>
 
  296     decltype( 
auto ) find( const typename T::key_type& 
key )
 const {
 
  299     template <
class T = ValueType>
 
  300     decltype( 
auto ) find( const typename T::key_type& 
key ) {
 
  303     template <
class ARG, 
class T = ValueType>
 
  304     decltype( 
auto ) erase( ARG arg ) {
 
  305       return value().erase( arg );
 
  307     template <
class = ValueType>
 
  312     template <
class = ValueType>
 
  316     template <
class = ValueType>
 
  321     template <
class = ValueType>
 
  325     template <
class T = ValueType>
 
  330     template <
class T = ValueType>
 
  336     template <
class T = const ValueType>
 
  337     decltype( 
auto ) 
key()
 const {
 
  338       return value().key();
 
  340     template <
class T = const ValueType>
 
  341     decltype( 
auto ) objKey()
 const {
 
  342       return value().objKey();
 
  344     template <
class T = const ValueType>
 
  345     decltype( 
auto ) fullKey()
 const {
 
  346       return value().fullKey();
 
  348     template <
class T = ValueType>
 
  349     decltype( 
auto ) initialize() {
 
  350       return value().initialize();
 
  352     template <
class T = ValueType>
 
  353     decltype( 
auto ) makeHandles()
 const {
 
  354       return value().makeHandles();
 
  356     template <
class ARG, 
class T = ValueType>
 
  357     decltype( 
auto ) makeHandles( const ARG& arg )
 const {
 
  358       return value().makeHandles( arg );
 
  364     template <
class... Args>
 
  365     decltype( std::declval<ValueType>()( std::declval<Args&&>()... ) ) operator()( Args&&... 
args ) const
 
  366         noexcept( noexcept( 
std::declval<
ValueType>()( 
std::declval<Args&&>()... ) ) ) {
 
  367       return value()( std::forward<Args>( 
args )... );
 
  375           ( std::is_same_v<ValueType, std::string> ) ? 
nullptr : 
dynamic_cast<const Property*
>( &source );
 
  386       return dest.assign( *
this );
 
  398             "Cannot convert '" + source + 
"' for property '" + 
name() + 
"' in class '" + 
ownerTypeName() + 
"'";
 
  400         case ParsingErrorPolicy::Ignore:
 
  402         case ParsingErrorPolicy::Exception:
 
  405         case ParsingErrorPolicy::Warning:
 
  406           std::cerr << 
"WARNING: " << errMsg << 
"': " << err.
what() << 
'\n';
 
  408         case ParsingErrorPolicy::Abort:
 
  409           std::cerr << 
"FATAL: " << errMsg << 
"': " << err.
what() << 
'\n';
 
  430   template <
class T, 
class TP, 
class V, 
class H>
 
  432     return p.operator==( 
v );
 
  436   template <
class T, 
class TP, 
class V, 
class H>
 
  438     return p.operator!=( 
v );
 
  442   template <
class T, 
class TP, 
class V, 
class H>
 
  443   decltype( 
auto ) operator+( const T& 
v, const 
Property<TP, V, H>& p ) {
 
  444     return v + p.value();
 
  447   template <
class TYPE, 
class HANDLERS = Details::Property::UpdateHandler>
 
  450   template <
class TYPE>
 
  456 template <
class TYPE>
 
  459 template <
class TYPE>
 
  540 template <
typename Handler = 
typename Gaudi::Details::Property::UpdateHandler>
 
  545   using PropertyBase::PropertyBase;
 
  591   bool load( PropertyBase& destination )
 const override { 
return destination.assign( *
this ); }
 
  628   bool load( PropertyBase& destination )
 const override { 
return destination.assign( *
this ); }
 
  802     template <
class TYPE>
 
  827     template <
class TYPE>
 
  877     template <
unsigned N>
 
  913     template <
class TYPE>
 
  991     template <
class TYPE>
 
 1017     template <
class TYPE>
 
 1068     template <
unsigned N>
 
 1145     template <
class TYPE>
 
  
 
VerifierType & verifier()
Accessor to verifier.
 
Gaudi::Property< unsigned long & > UnsignedLongPropertyRef
 
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
 
Property & operator-=(const T &other)
 
const std::function< void(PropertyBase &)> readCallBack() const override
get a reference to the readCallBack
 
const std::string name() const
property name
 
Property & operator=(T &&v)
Assignment from value.
 
Gaudi::Property< signed char & > SignedCharPropertyRef
 
bool operator==(const T &other) const
equality comparison
 
constexpr auto size(const T &, Args &&...) noexcept
 
Gaudi::Property< int & > IntegerPropertyRef
 
bool load(PropertyBase &destination) const override
 
GaudiHandleBase * m_pValue
Pointer to the real property.
 
Gaudi::Property< std::vector< std::string > > StringArrayProperty
 
const GaudiHandleArrayBase & value() const
 
Gaudi::Property< std::vector< char > & > CharArrayPropertyRef
 
const std::function< void(Details::PropertyBase &)> updateCallBack() const override
get a reference to the updateCallBack
 
Gaudi::Property< std::vector< unsigned short > & > UnsignedShortArrayPropertyRef
 
ValueType operator++(int)
 
Gaudi::Property< std::vector< unsigned long long > & > UnsignedLongLongArrayPropertyRef
 
std::enable_if_t<!is_this_type_v< T > > not_copying
 
Gaudi::Property< std::vector< char > > CharArrayProperty
 
Gaudi::Property< short & > ShortPropertyRef
 
bool operator==(const T &v, const Property< TP, V, H > &p)
delegate (value == property) to property operator==
 
const VerifierType & verifier() const
Accessor to verifier.
 
Gaudi::Property< unsigned long long & > UnsignedLongLongPropertyRef
 
Gaudi::Property< long & > LongPropertyRef
 
Gaudi::Property< unsigned int > UnsignedIntegerProperty
 
Gaudi::Property< std::vector< std::string > & > StringArrayPropertyRef
 
Gaudi::Property< std::vector< unsigned char > & > UnsignedCharArrayPropertyRef
 
Gaudi::Property< unsigned int & > UnsignedIntegerPropertyRef
 
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 doc...
 
Gaudi::Property< std::vector< signed char > > SignedCharArrayProperty
 
Gaudi::Property< long double & > LongDoublePropertyRef
 
Details::PropertyBase * clone() const override
clones the current property
 
Gaudi::Property< double > DoubleProperty
 
Property(T &&v)
Construct an anonymous property from a value.
 
Gaudi::Property< std::vector< double > > DoubleArrayProperty
 
bool assign(const Details::PropertyBase &source) override
get the value from another property
 
virtual void toStream(std::ostream &out) const =0
value -> stream
 
Gaudi::Property< unsigned char > UnsignedCharProperty
 
Gaudi::Property< std::vector< unsigned long long > > UnsignedLongLongArrayProperty
 
bool load(Details::PropertyBase &dest) const override
set value to another property
 
virtual StatusCode fromString(const std::string &value)=0
string -> value
 
Gaudi::Property< short > ShortProperty
 
virtual PropertyBase & declareReadHandler(std::function< void(PropertyBase &)> fun)=0
set new callback for reading
 
Gaudi::Property< std::vector< long double > & > LongDoubleArrayPropertyRef
 
StatusCode fromString(const std::string &source) override
string -> value
 
bool setValue(const ValueType &v)
 
Gaudi::Property< std::vector< unsigned int > > UnsignedIntegerArrayProperty
 
Gaudi::Property< long > LongProperty
 
vector< std::string > StorageType
Hosted type.
 
Gaudi::Property< char & > CharPropertyRef
 
ValueType operator--(int)
 
PropertyBase & declareReadHandler(std::function< void(PropertyBase &)> fun) override
set new callback for reading
 
Gaudi::Property< float & > FloatPropertyRef
 
Gaudi::Property< long long > LongLongProperty
 
Gaudi::Property< std::vector< float > > FloatArrayProperty
 
double * begin(CLHEP::HepVector &v)
 
bool assign(const PropertyBase &source) override
 
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
 
Gaudi::Property< std::vector< bool > > BooleanArrayProperty
 
GAUDI_API Gaudi::Details::PropertyBase * getProperty(const IProperty *p, std::string_view name)
simple function which gets the property with given name from the component
 
Gaudi::Property< unsigned char & > UnsignedCharPropertyRef
 
bool operator!=(const T &other) const
inequality comparison
 
Details::PropertyBase & declareUpdateHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for update
 
const ValueType & value() const
 
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.
 
PropertyBase(const std::type_info &type, std::string name="", std::string doc="", std::string semantics="")
constructor from the property name and the type
 
Property & operator+=(const T &other)
 
Gaudi::Property< std::vector< long > > LongArrayProperty
 
bool set(const ValueType &v)
 
Gaudi::Property< char > CharProperty
 
Gaudi::Property< std::vector< double > & > DoubleArrayPropertyRef
 
const GaudiHandleBase & value() const
 
Gaudi::Property< std::vector< unsigned short > > UnsignedShortArrayProperty
 
std::string semantics() const
property semantics
 
PropertyBase & declareUpdateHandler(std::function< void(PropertyBase &)> fun) override
set new callback for update
 
bool useUpdateHandler() override
manual trigger for callback for update
 
ParsingErrorPolicy parsingErrorPolicy()
 
Header file for std:chrono::duration-based Counters.
 
Base class of array's of various gaudihandles.
 
GaudiHandleArrayProperty * clone() const override
clones the current property
 
Gaudi::Property< std::vector< short > > ShortArrayProperty
 
Gaudi::Property< unsigned short & > UnsignedShortPropertyRef
 
GaudiHandleProperty & operator=(const GaudiHandleBase &value)
 
Gaudi::Property< long long & > LongLongPropertyRef
 
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 doc...
 
virtual PropertyBase & declareUpdateHandler(std::function< void(PropertyBase &)> fun)=0
set new callback for update
 
Gaudi::Property< std::vector< long long > > LongLongArrayProperty
 
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
 
void toStream(std::ostream &out) const override
value -> stream
 
Helper class to simplify the migration old properties deriving directly from PropertyBase.
 
Gaudi::Property< float > FloatProperty
 
constexpr static const auto SUCCESS
 
Details::PropertyBase & declareReadHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for reading
 
const std::function< void(Details::PropertyBase &)> readCallBack() const override
get a reference to the readCallBack
 
Gaudi::Property< std::vector< long long > & > LongLongArrayPropertyRef
 
const std::function< void(PropertyBase &)> updateCallBack() const override
get a reference to the updateCallBack
 
StorageType m_value
Storage.
 
virtual std::string toString() const =0
value -> string
 
Gaudi::Property< bool > BooleanProperty
 
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
 
Gaudi::Property< std::vector< unsigned int > & > UnsignedIntegerArrayPropertyRef
 
bool useUpdateHandler() override
use the call-back function at update, if available
 
bool assign(const PropertyBase &source) override
 
Gaudi::Property< unsigned short > UnsignedShortProperty
 
Gaudi::Property< std::vector< unsigned long > & > UnsignedLongArrayPropertyRef
 
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.
 
std::string toString() const override
value -> string
 
Gaudi::Property< std::vector< float > & > FloatArrayPropertyRef
 
bool operator<(const T &other) const
"less" comparison
 
Gaudi::Property< std::vector< unsigned long > > UnsignedLongArrayProperty
 
static constexpr bool is_this_type_v
helper typedefs for SFINAE
 
GaudiHandleProperty * clone() const override
clones the current property
 
Property(std::string name, T &&value, std::string doc="", std::string semantics="")
the constructor with property name, value and documentation.
 
Property(OWNER *owner, std::string name, T &&value, std::string doc="", std::string semantics="")
Autodeclaring constructor with property name, value and documentation.
 
Gaudi::Property< unsigned long > UnsignedLongProperty
 
Gaudi::Property< std::vector< unsigned char > > UnsignedCharArrayProperty
 
Gaudi::Property< signed char > SignedCharProperty
 
Gaudi::Property< std::vector< int > > IntegerArrayProperty
 
constexpr static const auto FAILURE
 
Gaudi::Property< long double > LongDoubleProperty
 
std::string ownerTypeName() const
get the string for the type of the owner class (used for documentation)
 
bool operator!=(const T &v, const Property< TP, V, H > &p)
delegate (value != property) to property operator!=
 
Gaudi::Property< std::vector< long double > > LongDoubleArrayProperty
 
GaudiHandleArrayProperty & operator=(const GaudiHandleArrayBase &value)
 
Gaudi::Property< unsigned long long > UnsignedLongLongProperty
 
Property(OWNER *owner, std::string name)
Autodeclaring constructor with property name, value and documentation.
 
bool load(PropertyBase &destination) const override
 
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
 
void useReadHandler() const
use the call-back function at reading, if available
 
typename std::remove_reference< StorageType >::type ValueType
 
Gaudi::Property< std::vector< long > & > LongArrayPropertyRef
 
Implementation of property with value of concrete type.
 
GAUDI_API bool hasProperty(const IProperty *p, std::string_view name)
simple function which check the existence of the property with the given name.
 
Gaudi::Property< std::vector< bool > & > BooleanArrayPropertyRef
 
Gaudi::Property< std::vector< int > & > IntegerArrayPropertyRef
 
std::ostream & fillStream(std::ostream &stream) const override
Properly quote string properties when printing them.
 
Gaudi::Property< int > IntegerProperty
 
Gaudi::Property< std::string > StringProperty
 
Gaudi::Property< std::vector< signed char > & > SignedCharArrayPropertyRef
 
Gaudi::Property< std::string & > StringPropertyRef
 
Gaudi::Property< double & > DoublePropertyRef
 
Gaudi::Property< bool & > BooleanPropertyRef
 
Gaudi::Property< std::vector< short > & > ShortArrayPropertyRef
 
Property()
Construct an anonymous property with default constructed value.