ColorSeriesProperties.hh
1.57 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
/*
* ColorSerieProperties.hh
*
* Created on: 15 nov. 2014
* Author: AKKA
*/
#ifndef COLORSERIESPROPERTIES_HH_
#define COLORSERIESPROPERTIES_HH_
#include <string>
#include <map>
#include <algorithm>
#include <cmath>
#include <ctgmath>
namespace plot {
/**
* Color Serie properties
*/
class ColorSeriesProperties {
public:
ColorSeriesProperties() :
_id(-1),
_index(-1),
_colorParamIds(),
_min(nan("")),
_max(nan("")) {
}
virtual ~ColorSeriesProperties() {
}
int getId() const {
return _id;
}
void setId(int id) {
_id = id;
}
int getIndex() const {
return _index;
}
void setIndex(int index) {
_index = index;
}
/**
* Adds a paramId to the paramId vector if not already in.
*/
void addParamId(const std::string &relatedYParamId, const std::string &colorParamId)
{
_colorParamIds[relatedYParamId] = colorParamId;
}
std::map<std::string, std::string> &getColorParamIds() {
return _colorParamIds;
}
double getMax() const {
return _max;
}
void setMax(double max) {
_max = max;
}
double getMin() const {
return _min;
}
void setMin(double min) {
_min = min;
}
/*
* Dumps properties for test.
*/
void dump(std::ostream& out_, std::string& prefix_);
private :
/**
* Color serie id
*/
int _id;
/**
* Component index, -1 if scalar vector
*/
int _index;
/**
* Related Param Ids
*/
std::map<std::string, std::string> _colorParamIds;
/*
* Min acceptable value
*/
double _min;
/*
* Max acceptable value
*/
double _max;
};
} /* namespace plot */
#endif /* COLORSERIESPROPERTIES_HH_ */