#include "GlobalSettings.h"
-GlobalSettings::GlobalSettings() {
- verbose = false;
-}
-
-GlobalSettings::~GlobalSettings() {
-}
-
-GlobalSettings* GlobalSettings::instance = 0;
-
-GlobalSettings* GlobalSettings::getInstance() {
- if (instance) {
- return instance;
- }
- instance = new GlobalSettings();
- return instance;
-}
-
bool GlobalSettings::isVerbose() {
return verbose;
}
void GlobalSettings::setVerbose(bool verbose) {
- this->verbose = verbose;
+ GlobalSettings::verbose = verbose;
}
class GlobalSettings {
-private:
- GlobalSettings();
- ~GlobalSettings();
-
public:
- static GlobalSettings* getInstance();
-
- bool isVerbose();
- void setVerbose(bool verbose);
+ static bool isVerbose();
+ static void setVerbose(bool verbose);
private:
- static GlobalSettings* instance;
- bool verbose;
+ static bool verbose;
};