InstantSeriesProperties.hh
2.13 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
/*
* InstantSeriesProperties.hh
*
* Created on: 13 déc. 2013
* Author: CS
*/
#ifndef INSTANTSERIESPROPERTIES_HH_
#define INSTANTSERIESPROPERTIES_HH_
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include "SeriesProperties.hh"
namespace plot {
/**
* Instant Serie properties for InstantPlot
*/
class InstantSeriesProperties: public SeriesProperties {
public:
InstantSeriesProperties() :
SeriesProperties(),
_tableOnXAxis(true),
_id(-1),
_tableParamsId() {
}
InstantSeriesProperties(const SeriesProperties& ref_) :
SeriesProperties(ref_),
_tableOnXAxis(true),
_id(-1),
_tableParamsId()
{
}
InstantSeriesProperties(const InstantSeriesProperties& pParamDrawingProperties_) :
SeriesProperties(pParamDrawingProperties_),
_tableOnXAxis(pParamDrawingProperties_._tableOnXAxis),
_id(pParamDrawingProperties_._id),
_tableParamsId(pParamDrawingProperties_._tableParamsId)
{
}
InstantSeriesProperties& operator=(const InstantSeriesProperties& ref_) {
SeriesProperties::operator=(ref_);
_tableOnXAxis = ref_._tableOnXAxis;
_tableParamsId = ref_._tableParamsId;
_id = ref_._id;
return *this;
}
virtual ~InstantSeriesProperties() {
}
bool getTableOnXAxis() const {
return _tableOnXAxis;
}
void setTableOnXAxis(bool tableOnXAxis) {
_tableOnXAxis = tableOnXAxis;
}
int getId() const {
return _id;
}
void setId(int id) {
_id = id;
}
std::string getTableParamIdByName(std::string paramName){
return _tableParamsId[paramName];
}
std::map<std::string, std::string>& getTableParams() {
return _tableParamsId;
}
void addTableParam(std::string paramName, std::string paramId) {
_tableParamsId[paramName] = paramId;
}
/*
* Dumps properties for test.
*/
void dump(std::ostream& out_, std::string& prefix_);
private :
/**
* draw table value on x axis on the plot
*/
bool _tableOnXAxis;
/**
* @brief Serie identifier used by the fill element
*/
int _id;
/**
* @brief Calculated tableParamsId (from resolution).
*/
std::map<std::string, std::string> _tableParamsId;
};
} /* namespace plot */
#endif /* INSTANTSERIESPROPERTIES_HH_ */