diff options
Diffstat (limited to 'xmrstak/misc/environment.hpp')
-rw-r--r-- | xmrstak/misc/environment.hpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/xmrstak/misc/environment.hpp b/xmrstak/misc/environment.hpp new file mode 100644 index 0000000..15f8cce --- /dev/null +++ b/xmrstak/misc/environment.hpp @@ -0,0 +1,46 @@ +#pragma once + +class printer; +class jconf; +class executor; + +namespace xmrstak +{ + +class GlobalStates; +class Params; + +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; + this->pExecutor = env.pExecutor; + this->pParams = env.pParams; + return *this; + } + + + Environment() : pPrinter(nullptr), pGlobalStates(nullptr) + { + } + + + printer* pPrinter; + GlobalStates* pGlobalStates; + jconf* pJconfConfig; + executor* pExecutor; + Params* pParams; + +}; + +} // namepsace xmrstak |