add global settings container
[ecparse.git] / GlobalSettings.cpp
diff --git a/GlobalSettings.cpp b/GlobalSettings.cpp
new file mode 100644 (file)
index 0000000..bbfc11c
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * © 2008 by David ‘Bombe’ Roden <bombe@pterodactylus.net>
+ */
+
+#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;
+}
+
+void GlobalSettings::setVerbose(bool verbose) {
+       this->verbose = verbose;
+}
+