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 {
41 {
42 
43  public:
44  typedef std::map<std::string, std::vector<PluginInfo> > CategoryToInfos;
45  typedef std::pair< std::string, std::string> NameAndType;
46  typedef std::vector< NameAndType > NameAndTypes;
47  typedef std::map<boost::filesystem::path, NameAndTypes > LoadableToPlugins;
48 
49  // ---------- const member functions ---------------------
50 
51  // ---------- static member functions --------------------
52 
53  // ---------- member functions ---------------------------
58  static void read(std::istream&, const boost::filesystem::path& iDirectory, CategoryToInfos& oOut);
59  static void write(const CategoryToInfos&, std::ostream&);
60 
61  static void read(std::istream&, LoadableToPlugins& oOut);
62  static void write(LoadableToPlugins& iIn, std::ostream&);
63  private:
64  //for testing
65  friend class ::TestCacheParser;
66  CacheParser(const CacheParser&) = delete; // stop default
67 
68  const CacheParser& operator=(const CacheParser&) = delete; // stop default
69 
70  static bool readline(std::istream& iIn, const boost::filesystem::path& iDirectory,
71  unsigned long iRecordNumber, PluginInfo &oInfo, std::string& oPluginType);
74 
75  // ---------- member data --------------------------------
76 
77 };
78 
79 }
80 #endif
static std::string & restoreSpaces(std::string &io)
Definition: CacheParser.cc:225
std::pair< std::string, std::string > NameAndType
Definition: CacheParser.h:45
std::map< std::string, std::vector< PluginInfo > > CategoryToInfos
Definition: CacheParser.h:44
CacheParser(const CacheParser &)=delete
static bool readline(std::istream &iIn, const boost::filesystem::path &iDirectory, unsigned long iRecordNumber, PluginInfo &oInfo, std::string &oPluginType)
Definition: CacheParser.cc:85
std::map< boost::filesystem::path, NameAndTypes > LoadableToPlugins
Definition: CacheParser.h:47
const CacheParser & operator=(const CacheParser &)=delete
std::vector< NameAndType > NameAndTypes
Definition: CacheParser.h:46
static void write(const CategoryToInfos &, std::ostream &)
Definition: CacheParser.cc:151
static std::string & replaceSpaces(std::string &io)
Definition: CacheParser.cc:216
static void read(std::istream &, const boost::filesystem::path &iDirectory, CategoryToInfos &oOut)
Definition: CacheParser.cc:125