summaryrefslogtreecommitdiffstats
path: root/Environment.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Environment.hpp')
-rw-r--r--Environment.hpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/Environment.hpp b/Environment.hpp
new file mode 100644
index 0000000..9f887a1
--- /dev/null
+++ b/Environment.hpp
@@ -0,0 +1,42 @@
+#pragma once
+
+class printer;
+class jconf;
+
+namespace xmrstak
+{
+
+class GlobalStates;
+
+struct Environment
+{
+
+ static Environment& inst()
+ {
+ static Environment env;
+ return env;
+ }
+
+ Environment& operator=(const Environment& env)
+ {
+ this->pPrinter = env.pPrinter;
+ this->pGlobalStates = env.pGlobalStates;
+ this->pJconfConfig = env.pJconfConfig;
+ return *this;
+ }
+
+
+ Environment() : pPrinter(nullptr), pGlobalStates(nullptr)
+ {
+ }
+
+
+ printer* pPrinter;
+
+ GlobalStates* pGlobalStates;
+
+ jconf* pJconfConfig;
+
+};
+
+} // namepsace xmrstak
OpenPOWER on IntegriCloud