00001 #ifndef __EMCDATASTORAGEMAP_H__ 00002 #define __EMCDATASTORAGEMAP_H__ 00003 00004 #ifndef __EMCMANAGEABLE_H__ 00005 # include "emcManageable.h" 00006 #endif 00007 #include <map> 00008 #include <iostream> 00009 #include <string> 00010 #include <vector> 00011 00020 class emcDataStorageMap 00021 { 00022 public: 00023 00028 emcDataStorageMap(emcManageable::EStorage def = emcManageable::kDB_Pg); 00029 00031 void clear(); 00032 00037 bool empty() const; 00038 00047 bool parse(const std::string& str); 00048 00050 emcManageable::EStorage storage() const; 00051 00053 emcManageable::EStorage storage(const std::string& what) const; 00054 00059 bool storage(const std::string& what, const std::string& storagename); 00060 00065 emcManageable::EStorage storage(const char* what) const; 00067 bool storage(const char* what, const char* storagename); 00069 00071 std::vector<std::string> knownStorages() const; 00072 00074 void print(std::ostream& out = std::cout) const; 00075 00076 private: 00077 emcManageable::EStorage fDefaultStorage; 00078 typedef std::map<const std::string, emcManageable::EStorage> TMAP; 00079 TMAP fMap; 00080 }; 00081 00082 std::ostream& operator<<(std::ostream& out, const emcDataStorageMap&); 00083 00084 #endif