Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsGlobalProperties.h
Go to the documentation of this file.
1 
14 #ifndef WS_GLOBAL_PROPERTIES_H__
15 #define WS_GLOBAL_PROPERTIES_H__
16 #include <iostream>
17 
18 #include "WsAbstractProperties.h"
19 
27 public:
28 
29 
30  static WsGlobalProperties* instance();
31 
39  std::string get(const std::string& section, const std::string& id, const std::string& def);
40 
48  void set(const std::string& section, std::string key, std::string value);
49 
59  std::string getAndReplace(const std::string& section, const std::string& id, const std::string& newVal, const std::string& def);
60 
61 protected:
66 
67 private:
69 
70 };
71 #endif
Global properties class.
static WsGlobalProperties * m_instance
WsGlobalProperties()
Constructor.
Abstract Properties class.
static WsGlobalProperties * instance()
void set(const std::string &section, std::string key, std::string value)
Changes or sets the propety with key 'key' to value 'value' If the property already exist...
std::string getAndReplace(const std::string &section, const std::string &id, const std::string &newVal, const std::string &def)
Search for property id and replaces the $1 in the string with newVal. If the property is not found...
Abstract class for properties.