10 #include <unordered_set> 24 #include "boost/algorithm/string/compare.hpp" 43 return **( all_strings.insert( std::make_unique<std::string>(
std::move( str ) ) ).first );
166 template <
typename C,
typename BinaryPredicate>
167 bool equal_(
const C& c1,
const C& c2, BinaryPredicate&& p ) {
168 return c1.size() == c2.size() &&
178 return p && equal_( m_name, p->
name(), boost::algorithm::is_iequal{} );
206 if ( !p ) {
return nullptr; }
211 return ifound != props.end() ? *ifound :
nullptr;
234 if ( !p ) {
return nullptr; }
236 IInterface* _i = const_cast<IInterface*>( p );
237 if ( !_i ) {
return nullptr; }
294 if ( !p ) {
return nullptr; }
296 return p->
end() != ifound ? *ifound :
nullptr;
336 if ( !doc.
empty() ) {
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.
const GaudiHandleArrayBase & value() const
virtual bool assign(const PropertyBase &source)=0
import the property value form the source
std::string typeAndName() const
The full type and name: "type/name".
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
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
constexpr static const auto SUCCESS
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
const std::string name() const
property name
const char *PyHelper() getProperty(IInterface *p, char *name)
void toStream(std::ostream &out) const override
value -> stream
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)
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)
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
std::string toString() const override
value -> string
virtual std::ostream & fillStream(std::ostream &) const
the printout of the property value
StatusCode fromString(const std::string &s) override
string -> value
const StatusCode & ignore() const
Ignore/check StatusCode.
Base class of array's of various gaudihandles.
void toStream(std::ostream &out) const override
value -> stream
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
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
virtual const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const =0
Get list of properties.
constexpr static const auto FAILURE
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
std::string toString() const override
value -> string
const GaudiHandleBase & value() const
The IProperty is the basic interface for all components which have properties that can be set or get.
virtual std::string toString() const =0
value -> string
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
void useReadHandler() const
use the call-back function at reading, if available