11 #include "boost/algorithm/string.hpp" 18 constexpr
struct select1st_t {
19 template <
typename S,
typename T>
23 template <
typename S,
typename T>
31 for (
const auto& cur : m_catalog ) {
32 for (
auto& prop : cur.second )
delete prop;
37 auto props = findProperties( client );
39 removeProperty( client, property->
name() ).ignore();
40 props->push_back( property );
48 auto props = findProperties( client );
50 auto res = findProperty( *props, name );
53 props->erase( res.second );
60 return findProperties( client );
65 result.
reserve( m_catalog.size() );
71 auto result = m_catalog.find( client );
72 return ( result != m_catalog.end() ) ? &result->second :
nullptr;
76 auto result = m_catalog.find( client );
77 return ( result != m_catalog.end() ) ? &result->second :
nullptr;
83 return boost::iequals( name, prop->
name() );
91 return boost::iequals( name, prop->
name() );
98 for (
const auto& iclient : m_catalog ) {
99 o <<
"Client '" << iclient.first <<
"'" <<
std::endl;
100 for (
const auto& p : iclient.second ) {
101 if ( p ) o <<
"\t" << ( *p ) <<
std::endl;
109 auto props = findProperties( client );
111 const auto res = findProperty( *props, name );
112 if ( res.first ) {
return *res.second; }
const PropertiesT * getProperties(const std::string &client) const
std::ostream & fillStream(std::ostream &o) const
dump the content of catalog to std::ostream
const std::string name() const
property name
Gaudi::Details::PropertyBase * property(const std::string &name) const
constexpr static const auto SUCCESS
StatusCode addProperty(const std::string &client, const Gaudi::Details::PropertyBase *property)
std::ostream & operator<<(std::ostream &o, const SvcCatalog &c)
printoput operator
StatusCode removeProperty(const std::string &client, const std::string &name)
std::vector< std::string > getClients() const
const PropertiesT * findProperties(const std::string &client) const
This class is used for returning status codes from appropriate routines.
std::pair< bool, PropertiesT::const_iterator > findProperty(const PropertiesT &props, const std::string &name) const
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
const Gaudi::Details::PropertyBase * getProperty(const std::string &client, const std::string &name) const
virtual Out operator()(const vector_of_const_< In > &inputs) const =0
T back_inserter(T...args)