CMS 3D CMS Logo

CacheParser.h
Go to the documentation of this file.
1 #ifndef FWCore_PluginManager_CacheParser_h
2 #define FWCore_PluginManager_CacheParser_h
3 // -*- C++ -*-
4 //
5 // Package: PluginManager
6 // Class : CacheParser
7 //
21 //
22 // Original Author: Chris Jones
23 // Created: Wed Apr 4 14:30:51 EDT 2007
24 //
25 
26 // system include files
27 #include <filesystem>
28 #include <iosfwd>
29 #include <string>
30 #include <map>
31 #include <vector>
32 // user include files
34 
35 // forward declarations
36 class TestCacheParser;
37 
38 namespace edmplugin {
39  class CacheParser {
40  public:
41  typedef std::map<std::string, std::vector<PluginInfo> > CategoryToInfos;
42  typedef std::pair<std::string, std::string> NameAndType;
43  typedef std::vector<NameAndType> NameAndTypes;
44  typedef std::map<std::filesystem::path, NameAndTypes> LoadableToPlugins;
45 
46  // ---------- const member functions ---------------------
47 
48  // ---------- static member functions --------------------
49 
50  // ---------- member functions ---------------------------
55  static void read(std::istream&, const std::filesystem::path& iDirectory, CategoryToInfos& oOut);
56  static void write(const CategoryToInfos&, std::ostream&);
57 
58  static void read(std::istream&, LoadableToPlugins& oOut);
59  static void write(LoadableToPlugins& iIn, std::ostream&);
60 
61  private:
62  //for testing
63  friend class ::TestCacheParser;
64  CacheParser(const CacheParser&) = delete; // stop default
65 
66  const CacheParser& operator=(const CacheParser&) = delete; // stop default
67 
68  static bool readline(std::istream& iIn,
69  const std::filesystem::path& iDirectory,
70  unsigned long iRecordNumber,
71  PluginInfo& oInfo,
72  std::string& oPluginType);
75 
76  // ---------- member data --------------------------------
77  };
78 
79 } // namespace edmplugin
80 #endif
edmplugin
Definition: AlignmentAlgorithmPluginFactory.cc:9
edmplugin::CacheParser::NameAndType
std::pair< std::string, std::string > NameAndType
Definition: CacheParser.h:42
edmplugin::CacheParser::operator=
const CacheParser & operator=(const CacheParser &)=delete
edmplugin::CacheParser::restoreSpaces
static std::string & restoreSpaces(std::string &io)
Definition: CacheParser.cc:203
edmplugin::CacheParser::LoadableToPlugins
std::map< std::filesystem::path, NameAndTypes > LoadableToPlugins
Definition: CacheParser.h:44
edmplugin::CacheParser::CategoryToInfos
std::map< std::string, std::vector< PluginInfo > > CategoryToInfos
Definition: CacheParser.h:41
PluginInfo.h
edmplugin::CacheParser::read
static void read(std::istream &, const std::filesystem::path &iDirectory, CategoryToInfos &oOut)
Definition: CacheParser.cc:120
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edmplugin::CacheParser::replaceSpaces
static std::string & replaceSpaces(std::string &io)
Definition: CacheParser.cc:195
edmplugin::CacheParser::write
static void write(const CategoryToInfos &, std::ostream &)
Definition: CacheParser.cc:142
edmplugin::CacheParser::NameAndTypes
std::vector< NameAndType > NameAndTypes
Definition: CacheParser.h:43
edmplugin::CacheParser
Definition: CacheParser.h:39
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
edmplugin::CacheParser::readline
static bool readline(std::istream &iIn, const std::filesystem::path &iDirectory, unsigned long iRecordNumber, PluginInfo &oInfo, std::string &oPluginType)
Definition: CacheParser.cc:82
edmplugin::PluginInfo
Definition: PluginInfo.h:28
edmplugin::CacheParser::CacheParser
CacheParser(const CacheParser &)=delete