ConfigFile.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
9 #include <etk/Hash.hpp>
10 #include <ewol/debug.hpp>
11 #include <ejson/ejson.hpp>
12 #include <gale/resource/Resource.hpp>
13 
14 namespace ewol {
15  namespace resource {
16  class ConfigFile : public gale::Resource {
17  private:
18  ejson::Document m_doc;
20  protected:
21  ConfigFile();
22  void init(const std::string& _filename);
23  public:
24  virtual ~ConfigFile();
25  DECLARE_RESOURCE_NAMED_FACTORY(ConfigFile);
26  public:
27  void reload();
28 
29  int32_t request(const std::string& _paramName);
30 
31  double getNumber(int32_t _id);
32  std::string getString(int32_t _id);
33  bool getBoolean(int32_t _id);
34  public:
41  static ememory::SharedPtr<ewol::resource::ConfigFile> keep(const std::string& _filename);
42  };
43  };
44 };
static ememory::SharedPtr< ewol::resource::ConfigFile > keep(const std::string &_filename)
keep the resource pointer.
Definition: ConfigFile.hpp:16
Definition: Area.hpp:16