The Gaudi Framework  v33r0 (d5ea422b)
SvcCatalog.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 // ============================================================================
12 #ifndef JOBOPTIONSSVC_SVCCATALOG_H
13 #define JOBOPTIONSSVC_SVCCATALOG_H 1
14 // ============================================================================
15 // Include files
16 // ============================================================================
17 // STD & STL
18 // ============================================================================
19 #include <map>
20 #include <string>
21 #include <vector>
22 // ============================================================================
23 // GaudiKernel
24 // ============================================================================
25 #include "GaudiKernel/Property.h"
26 #include "GaudiKernel/StatusCode.h"
27 // ===========================================================================
28 
35 class SvcCatalog final {
36 public:
38  SvcCatalog() = default;
39  ~SvcCatalog();
40 
41  StatusCode addProperty( const std::string& client, const Gaudi::Details::PropertyBase* property );
42 
43  StatusCode removeProperty( const std::string& client, const std::string& name );
44  const PropertiesT* getProperties( const std::string& client ) const;
46  const Gaudi::Details::PropertyBase* getProperty( const std::string& client, const std::string& name ) const;
47 
48 public:
51 
52 private:
53  const PropertiesT* findProperties( const std::string& client ) const;
54  PropertiesT* findProperties( const std::string& client );
58 };
59 // ============================================================================
61 // ============================================================================
63 // ============================================================================
64 
65 // ============================================================================
66 // The END
67 // ============================================================================
68 #endif // JOBOPTIONSSVC_SVCCATALOG_H
const PropertiesT * findProperties(const std::string &client) const
Definition: SvcCatalog.cpp:80
const PropertiesT * getProperties(const std::string &client) const
Definition: SvcCatalog.cpp:69
const Gaudi::Details::PropertyBase * getProperty(const std::string &client, const std::string &name) const
Definition: SvcCatalog.cpp:117
std::vector< const Gaudi::Details::PropertyBase * > PropertiesT
Definition: SvcCatalog.h:37
StatusCode addProperty(const std::string &client, const Gaudi::Details::PropertyBase *property)
Definition: SvcCatalog.cpp:46
std::pair< bool, PropertiesT::const_iterator > findProperty(const PropertiesT &props, const std::string &name) const
Definition: SvcCatalog.cpp:90
STL class.
StatusCode removeProperty(const std::string &client, const std::string &name)
Definition: SvcCatalog.cpp:57
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
std::map< std::string, PropertiesT > m_catalog
Definition: SvcCatalog.h:57
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:42
std::vector< std::string > getClients() const
Definition: SvcCatalog.cpp:73
STL class.
std::ostream & fillStream(std::ostream &o) const
dump the content of catalog to std::ostream
Definition: SvcCatalog.cpp:106
SvcCatalog()=default
STL class.
std::ostream & operator<<(std::ostream &o, const SvcCatalog &c)
printoput operator
Definition: SvcCatalog.cpp:129