TurtleBrains  0.3.5
High quality, portable, C++ framework for rapid 2D game development.
tb_config_object.hpp
1 
9 #ifndef TurtleBrains_ConfigObject_hpp
10 #define TurtleBrains_ConfigObject_hpp
11 
12 #include <turtle_brains/core/tb_configuration.hpp>
13 #if defined(tb_with_development_kit)
14 
15 #include <turtle_brains/core/tb_string.hpp>
16 #include <turtle_brains/core/tb_noncopyable.hpp>
17 #include <turtle_brains/core/tb_dynamic_structure.hpp>
18 
19 namespace tbImplementation
20 {
21  class ConfigSetter;
22 };
23 
24 namespace TurtleBrains
25 {
26  namespace Development //requires Core and System
27  {
28 
35  class ConfigObject : public tbCore::Noncopyable
36  {
37  public:
41  static void AddConfigurationFile(const tbCore::tbString& configurationFilepath);
42 
50  static void CheckAndReloadConfigurationFiles(void);
51 
60  explicit ConfigObject(const tbCore::tbString& configurationName);
61 
65  ~ConfigObject(void);
66 
73  tbCore::int64 AsInteger(void) const;
74 
81  float AsFloat(void) const;
82 
89  bool AsBoolean(void) const;
90 
97  tbCore::tbString AsString(void) const;
98 
99  private:
100  friend class tbImplementation::ConfigSetter;
101 
102  const tbCore::tbString mName;
104  };
105 
106  }; /* namespace Development */
107 }; /* namespace TurtleBrains */
108 
109 namespace tbDevelopment = TurtleBrains::Development;
110 
111 #endif /* tb_with_development_kit */
112 #endif /* TurtleBrains_ConfigureObject_hpp */
int64_t int64
Signed integer with a size of 64 bits. Supports values from -(2^63) to (2^63 - 1).
Definition: tb_types.hpp:29
Contains some functionality to aid in easier / faster game development or other profiling tools...
Definition: tb_noncopyable.hpp:22
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
Definition: tb_dynamic_structure.hpp:37
std::string tbString
Definition: tb_string.hpp:335
Definition: tb_application_dialog.hpp:19