CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/FWCore/PluginManager/interface/CacheParser.h

Go to the documentation of this file.
00001 #ifndef FWCore_PluginManager_CacheParser_h
00002 #define FWCore_PluginManager_CacheParser_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     PluginManager
00006 // Class  :     CacheParser
00007 // 
00021 //
00022 // Original Author:  Chris Jones
00023 //         Created:  Wed Apr  4 14:30:51 EDT 2007
00024 // $Id: CacheParser.h,v 1.3 2007/06/14 02:52:57 wmtan Exp $
00025 //
00026 
00027 // system include files
00028 #include <iosfwd>
00029 #include <string>
00030 #include <map>
00031 #include <vector>
00032 #include <boost/filesystem/path.hpp>
00033 
00034 // user include files
00035 #include "FWCore/PluginManager/interface/PluginInfo.h"
00036 
00037 // forward declarations
00038 namespace edmplugin {
00039 class CacheParser
00040 {
00041 
00042    public:
00043       typedef std::map<std::string, std::vector<PluginInfo> > CategoryToInfos;
00044       typedef std::pair< std::string, std::string> NameAndType;
00045       typedef std::vector< NameAndType > NameAndTypes;
00046       typedef std::map<boost::filesystem::path, NameAndTypes > LoadableToPlugins;
00047 
00048       // ---------- const member functions ---------------------
00049 
00050       // ---------- static member functions --------------------
00051 
00052       // ---------- member functions ---------------------------
00057       static void read(std::istream&, const boost::filesystem::path& iDirectory, CategoryToInfos& oOut);
00058       static void write(const CategoryToInfos&, std::ostream&);
00059       
00060       static void read(std::istream&, LoadableToPlugins& oOut);
00061       static void write(LoadableToPlugins& iIn, std::ostream&);
00062    private:
00063       CacheParser(const CacheParser&); // stop default
00064 
00065       const CacheParser& operator=(const CacheParser&); // stop default
00066 
00067       static bool readline(std::istream& iIn, const boost::filesystem::path& iDirectory,
00068                unsigned long iRecordNumber, PluginInfo &oInfo, std::string& oPluginType);
00069       static std::string& replaceSpaces(std::string& io);
00070       static std::string& restoreSpaces(std::string& io);
00071       
00072       // ---------- member data --------------------------------
00073 
00074 };
00075 
00076 }
00077 #endif