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

struct globalStates;
struct 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