zoukankan      html  css  js  c++  java
  • XosConfig

    DcsConfig gDcssConfig
    \\
    XosConfig  config;
    XosConfig  defConfig;
    \\


    #ifndef __Include_XosConfig_h__
    #define __Include_XosConfig_h__
    #include "xos.h"
    #include <string>
    #include <map>
    #include <list>

    typedef std::list<std::string> StrList;
    typedef std::multimap<std::string, std::string> StrMMap;

    class XosConfig
    {
    public:
     XosConfig();
     XosConfig(const std::string& f);
     virtual ~XosConfig();
     virtual bool load();
     bool save(const std::string& file);
     bool get(const std::string& key, std::string& ret) const;
     bool getRange(const std::string& key, StrList& ret) const;
     void set(const std::string& key, const std::string& value);
     std::string getConfigFile() const
     {
      return file;
     }
     void setConfigFile(const std::string& f)
     {
      file = f;
     }
    protected:
     std::string file;
     StrMMap data; 
    };


    #endif // __Include_XosConfig_h__

  • 相关阅读:
    抽象类
    类初始化
    final关键字
    super关键字
    继承
    常用类

    封装
    方法重载
    031:Cetus sharding
  • 原文地址:https://www.cnblogs.com/greencolor/p/2218959.html
Copyright © 2011-2022 走看看