/************************************ * file enc : utf8 * author : wuyanyi09@gmail.com ************************************/ #ifndef CPPCOMMON_CONFIG_H #define CPPCOMMON_CONFIG_H #include #include #include #include "logger.h" namespace CPPCOMMON { using std::map; using std::string; using std::cout; using std::endl; using std::ifstream; class Config { public: Config(); ~Config(); bool init(const string& configFile); void display(); string getByKey(const string& key); private: string _stripComment(const string& line); map _map; bool _isInit; }; } namespace CPPCOMMON { extern Config gConfig; } #endif