00001 00017 #ifndef CFGPROXY_H 00018 #define CFGPROXY_H 00019 00020 #include "Midad/Util/NamedProxy.h" 00021 #include "Configurable/CfgConfigurable.h" 00022 #include <vector> 00023 #include <map> 00024 #include <string> 00025 00026 class CfgProxy : public NamedProxy 00027 { 00028 public: 00029 // SuperClass does the registration of "name" into namespace "group" 00030 CfgProxy(std::string name, std::string group, CfgConfigurable* cfg) 00031 : NamedProxy(name,group), fCfg(cfg) { fNames[group].push_back(name); } 00032 00033 // User gets the configurable 00034 CfgConfigurable* GetCfg() { return fCfg; } 00035 00036 typedef std::map<std::string,std::vector<std::string> > CfgProxyNameMap_t; 00037 static CfgProxyNameMap_t GetRegisteredNames() { return fNames; } 00038 private: 00039 static CfgProxyNameMap_t fNames; 00040 CfgConfigurable* fCfg; 00041 }; // end of class CfgProxy 00042 00043 #endif // CFGPROXY_H
1.3.9.1