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 <iosfwd>
28 #include <string>
29 #include <map>
30 #include <vector>
31 #include <boost/filesystem/path.hpp>
32 
33 // user include files
35 
36 // forward declarations
37 class TestCacheParser;
38 
39 namespace edmplugin {
40  class CacheParser {
41  public:
42  typedef std::map<std::string, std::vector<PluginInfo> > CategoryToInfos;
43  typedef std::pair<std::string, std::string> NameAndType;
44  typedef std::vector<NameAndType> NameAndTypes;
45  typedef std::map<boost::filesystem::path, NameAndTypes> LoadableToPlugins;
46 
47  // ---------- const member functions ---------------------
48 
49  // ---------- static member functions --------------------
50 
51  // ---------- member functions ---------------------------
56  static void read(std::istream&, const boost::filesystem::path& iDirectory, CategoryToInfos& oOut);
57  static void write(const CategoryToInfos&, std::ostream&);
58 
59  static void read(std::istream&, LoadableToPlugins& oOut);
60  static void write(LoadableToPlugins& iIn, std::ostream&);
61 
62  private:
63  //for testing
64  friend class ::TestCacheParser;
65  CacheParser(const CacheParser&) = delete; // stop default
66 
67  const CacheParser& operator=(const CacheParser&) = delete; // stop default
68 
69  static bool readline(std::istream& iIn,
70  const boost::filesystem::path& iDirectory,
71  unsigned long iRecordNumber,
72  PluginInfo& oInfo,
73  std::string& oPluginType);
76 
77  // ---------- member data --------------------------------
78  };
79 
80 } // namespace edmplugin
81 #endif
edmplugin
Definition: AlignmentAlgorithmPluginFactory.cc:9
edmplugin::CacheParser::read
static void read(std::istream &, const boost::filesystem::path &iDirectory, CategoryToInfos &oOut)
Definition: CacheParser.cc:120
edmplugin::CacheParser::readline
static bool readline(std::istream &iIn, const boost::filesystem::path &iDirectory, unsigned long iRecordNumber, PluginInfo &oInfo, std::string &oPluginType)
Definition: CacheParser.cc:82
edmplugin::CacheParser::NameAndType
std::pair< std::string, std::string > NameAndType
Definition: CacheParser.h:43
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::CategoryToInfos
std::map< std::string, std::vector< PluginInfo > > CategoryToInfos
Definition: CacheParser.h:42
PluginInfo.h
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::LoadableToPlugins
std::map< boost::filesystem::path, NameAndTypes > LoadableToPlugins
Definition: CacheParser.h:45
edmplugin::CacheParser::write
static void write(const CategoryToInfos &, std::ostream &)
Definition: CacheParser.cc:142
edmplugin::CacheParser::NameAndTypes
std::vector< NameAndType > NameAndTypes
Definition: CacheParser.h:44
edmplugin::CacheParser
Definition: CacheParser.h:40
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
edmplugin::PluginInfo
Definition: PluginInfo.h:28
edmplugin::CacheParser::CacheParser
CacheParser(const CacheParser &)=delete