summaryrefslogtreecommitdiffstats
path: root/xmrstak/misc/environment.hpp
blob: af4c12a5876a6fd578e17889424e45c16ce77956 (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