SvcCatalog.h
Go to the documentation of this file.
1 // ============================================================================
2 #ifndef JOBOPTIONSSVC_SVCCATALOG_H
3 #define JOBOPTIONSSVC_SVCCATALOG_H 1
4 // ============================================================================
5 // Include files
6 // ============================================================================
7 // STD & STL
8 // ============================================================================
9 #include <map>
10 #include <vector>
11 #include <string>
12 // ============================================================================
13 // GaudiKernel
14 // ============================================================================
15 #include "GaudiKernel/StatusCode.h"
16 #include "GaudiKernel/Property.h"
17 // ===========================================================================
18 
25 class SvcCatalog final
26 {
27 public:
28  typedef std::vector<const Property*> PropertiesT;
29  SvcCatalog() = default;
30  ~SvcCatalog();
31 
32  StatusCode addProperty( const std::string& client,
33  const Property* property );
34 
35  StatusCode removeProperty( const std::string& client,
36  const std::string& name );
37  const PropertiesT* getProperties( const std::string& client) const;
38  std::vector<std::string> getClients() const;
39 public:
41  std::ostream& fillStream ( std::ostream& o ) const ;
42 private:
43  const PropertiesT* findProperties(const std::string& client) const;
44  PropertiesT* findProperties(const std::string& client) ;
45  std::pair<bool, PropertiesT::iterator> findProperty(PropertiesT& props, const std::string& name);
46  std::map<std::string, PropertiesT> m_catalog;
47 };
48 // ============================================================================
50 // ============================================================================
51 std::ostream& operator<<( std::ostream& o , const SvcCatalog& c ) ;
52 // ============================================================================
53 
54 // ============================================================================
55 // The END
56 // ============================================================================
57 #endif // JOBOPTIONSSVC_SVCCATALOG_H
58 // ===========================================================================
tuple c
Definition: gaudirun.py:391
const PropertiesT * getProperties(const std::string &client) const
Definition: SvcCatalog.cpp:65
std::ostream & fillStream(std::ostream &o) const
dump the content of catalog to std::ostream
Definition: SvcCatalog.cpp:103
StatusCode addProperty(const std::string &client, const Property *property)
Definition: SvcCatalog.cpp:35
StatusCode removeProperty(const std::string &client, const std::string &name)
Definition: SvcCatalog.cpp:49
std::vector< std::string > getClients() const
Definition: SvcCatalog.cpp:67
const PropertiesT * findProperties(const std::string &client) const
Definition: SvcCatalog.cpp:76
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::map< std::string, PropertiesT > m_catalog
Definition: SvcCatalog.h:46
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
SvcCatalog()=default
std::vector< const Property * > PropertiesT
Definition: SvcCatalog.h:28
std::pair< bool, PropertiesT::iterator > findProperty(PropertiesT &props, const std::string &name)
Definition: SvcCatalog.cpp:93
std::ostream & operator<<(std::ostream &o, const SvcCatalog &c)
printoput operator
Definition: SvcCatalog.cpp:120