Blame view

src/ParamOutputImpl/Plot/InstantPlot/InstantSpectroProperties.hh 2.4 KB
fbe3c2bb   Benjamin Renard   First commit
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
/*
 * InstantSpectroProperties.hh
 *
 *  Created on: 18 déc. 2014
 *      Author: AKKA
 */

#ifndef INSTANTSPECTROPROPERTIES_HH_
#define INSTANTSPECTROPROPERTIES_HH_

#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>

#include "SpectroProperties.hh"

namespace plot {

/**
 * Instant Serie properties for InstantPlot
 */
class InstantSpectroProperties: public SpectroProperties {
public:
	InstantSpectroProperties() :
		SpectroProperties(),
1c0193a5   Benjamin Renard   Implement variabl...
28
29
30
		_dimOnXAxis(0),
		_table0ParamsId(),
		_table1ParamsId() {
fbe3c2bb   Benjamin Renard   First commit
31
32
33
	}
	InstantSpectroProperties(const SpectroProperties& ref_) :
		SpectroProperties(ref_),
1c0193a5   Benjamin Renard   Implement variabl...
34
35
36
		_dimOnXAxis(0),
		_table0ParamsId(),
		_table1ParamsId()
fbe3c2bb   Benjamin Renard   First commit
37
38
39
40
41
	{
	}

	InstantSpectroProperties(const InstantSpectroProperties& pParamDrawingProperties_) :
		SpectroProperties(pParamDrawingProperties_),
1c0193a5   Benjamin Renard   Implement variabl...
42
43
44
		_dimOnXAxis(pParamDrawingProperties_._dimOnXAxis),
		_table0ParamsId(),
		_table1ParamsId()
fbe3c2bb   Benjamin Renard   First commit
45
46
47
48
49
50
	{
	}

	InstantSpectroProperties& operator=(const InstantSpectroProperties& ref_) {
		SpectroProperties::operator=(ref_);
		_dimOnXAxis = ref_._dimOnXAxis;
1c0193a5   Benjamin Renard   Implement variabl...
51
52
		_table0ParamsId = ref_._table0ParamsId;
		_table1ParamsId = ref_._table1ParamsId;
fbe3c2bb   Benjamin Renard   First commit
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
		return *this;
	}


	virtual ~InstantSpectroProperties() {
	}

	int getDimOnXAxis() const {
		return _dimOnXAxis;
	}

	void setDimOnXAxis(int dimOnXAxis) {
		_dimOnXAxis = dimOnXAxis;
	}

1c0193a5   Benjamin Renard   Implement variabl...
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
	std::string getTable0ParamIdByName(std::string paramName){
		return _table0ParamsId[paramName];
	}

	std::map<std::string, std::string>& getTable0Params() {
		return _table0ParamsId;
	}

	void addTable0Param(std::string paramName, std::string paramId) {
		_table0ParamsId[paramName] = paramId;
	}

	std::string getTable1ParamIdByName(std::string paramName){
		return _table1ParamsId[paramName];
	}

	std::map<std::string, std::string>& getTable1Params() {
		return _table1ParamsId;
	}

	void addTable1Param(std::string paramName, std::string paramId) {
		_table1ParamsId[paramName] = paramId;
	}

fbe3c2bb   Benjamin Renard   First commit
92
93
94
95
96
97
98
99
100
101
102
	/*
	 * Dumps properties for test.
	 */
	void dump(std::ostream& out_, std::string& prefix_);

private :

	/**
	 * dimension to draw on X Axis
	 */
	int _dimOnXAxis;
1c0193a5   Benjamin Renard   Implement variabl...
103
104
105
106
107
108
109
110
111
112

	/**
	 * @brief Calculated tableParamsId for dimension 0 (from resolution).
	*/
	std::map<std::string, std::string> _table0ParamsId;

	/**
	 * @brief Calculated tableParamsId for dimension 1 (from resolution).
	*/
	std::map<std::string, std::string> _table1ParamsId;
fbe3c2bb   Benjamin Renard   First commit
113
114
115
116
};

} /* namespace plot */
#endif /* INSTANTSPECTROPROPERTIES_HH_ */