10 #include <unordered_set> 24 #include "boost/algorithm/string/compare.hpp" 46 return **( all_strings.insert( std::make_unique<std::string>(
std::move( str ) ) ).first );
183 template <
typename C,
typename BinaryPredicate>
184 bool equal_(
const C&
c1,
const C&
c2, BinaryPredicate&& p )
186 return c1.size() == c2.size() &&
197 return p && equal_(
m_name, p->
name(), boost::algorithm::is_iequal{} );
232 auto ifound =
std::find_if( props.begin(), props.end(), is_iByName{name} );
233 return ifound != props.end() ? *ifound :
nullptr;
266 return property ?
getProperty( property, name ) :
nullptr;
327 return p->
end() != ifound ? *ifound :
nullptr;
373 if ( !doc.
empty() ) {
411 if ( !doc.
empty() ) {
442 return setProperty( component, name, &property, doc );
547 return setProperty( component, name, &property, doc );
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
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
bool setValue(const GaudiHandleArrayBase &value)
void setDocumentation(std::string value)
set the documentation string
void setTypeAndName(std::string myTypeAndName)
The component "type/name" string.
virtual bool assign(const PropertyBase &source)=0
import the property value form the source
const std::string name() const
property name
StatusCode fromString(const std::string &s) override
string -> value
GAUDI_API bool hasProperty(const IProperty *p, const std::string &name)
simple function which check the existence of the property with the given name.
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Gaudi::Details::PropertyBase * property(const std::string &name) const
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
bool isFailure() const
Test for a status code of FAILURE.
std::string toString() const override
value -> string
Helper class to simplify the migration old properties deriving directly from PropertyBase.
virtual StatusCode setProperty(const Gaudi::Details::PropertyBase &p)=0
Set the property by property.
GaudiHandleBase * m_pValue
Pointer to the real property.
GaudiHandleProperty(std::string name, GaudiHandleBase &ref)
boost::string_ref m_name
property name
bool hasProperty(const std::string &name) const override
Return true if we have a property with the given name.
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in <myTypesAndNamesList>.
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
GaudiHandleArrayProperty(std::string name, GaudiHandleArrayBase &ref)
const GaudiHandleBase & value() const
void toStream(std::ostream &out) const override
value -> stream
const GaudiHandleArrayBase & value() const
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
virtual const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const =0
Get list of properties.
StatusCode fromString(const std::string &s) override
string -> value
Base class of array's of various gaudihandles.
void useReadHandler() const
use the call-back function at reading, if available
virtual Out operator()(const vector_of_const_< In > &inputs) const =0
void setPropertyName(std::string propName)
set name as used in declareProperty(name,gaudiHandle).
bool useUpdateHandler() override
use the call-back function at update, if available
std::string toString() const override
value -> string
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
std::string typeAndName() const
The full type and name: "type/name".
The IProperty is the basic interface for all components which have properties that can be set or get...
void toStream(std::ostream &out) const override
value -> stream
std::string toString(const Type &)
bool setValue(const GaudiHandleBase &value)
GAUDI_API Gaudi::Details::PropertyBase * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component