InstantSpectroProperties.hh
2.4 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
* 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(),
_dimOnXAxis(0),
_table0ParamsId(),
_table1ParamsId() {
}
InstantSpectroProperties(const SpectroProperties& ref_) :
SpectroProperties(ref_),
_dimOnXAxis(0),
_table0ParamsId(),
_table1ParamsId()
{
}
InstantSpectroProperties(const InstantSpectroProperties& pParamDrawingProperties_) :
SpectroProperties(pParamDrawingProperties_),
_dimOnXAxis(pParamDrawingProperties_._dimOnXAxis),
_table0ParamsId(),
_table1ParamsId()
{
}
InstantSpectroProperties& operator=(const InstantSpectroProperties& ref_) {
SpectroProperties::operator=(ref_);
_dimOnXAxis = ref_._dimOnXAxis;
_table0ParamsId = ref_._table0ParamsId;
_table1ParamsId = ref_._table1ParamsId;
return *this;
}
virtual ~InstantSpectroProperties() {
}
int getDimOnXAxis() const {
return _dimOnXAxis;
}
void setDimOnXAxis(int dimOnXAxis) {
_dimOnXAxis = dimOnXAxis;
}
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;
}
/*
* Dumps properties for test.
*/
void dump(std::ostream& out_, std::string& prefix_);
private :
/**
* dimension to draw on X Axis
*/
int _dimOnXAxis;
/**
* @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;
};
} /* namespace plot */
#endif /* INSTANTSPECTROPROPERTIES_HH_ */