summaryrefslogtreecommitdiffstats
path: root/xmrstak/misc/environment.hpp
blob: 15f8ccea89514b17e45deca4898e3d50e1b14961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
OpenPOWER on IntegriCloud