blob: 0f3b0b31404b46542708b0bc053e65535e7c6f4e (
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
|
#ifndef SYSTEMTAP_GRAPHDATA_HXX
#define SYSTEMTAP_GRAPHDATA_HXX 1
#include <utility>
#include <vector>
namespace systemtap
{
struct GraphData
{
public:
enum Style
{ BAR,
DOT
};
GraphData() : scale(1.0), style(BAR)
{
color[0] = 0.0; color[1] = 1.0; color[2] = 0.0;
}
typedef std::pair<double, double> Datum;
typedef std::vector<Datum> List;
// size of grid square at "normal" viewing
double scale;
double color[3];
Style style;
List data;
struct Compare
{
bool operator() (const Datum& lhs, const Datum& rhs) const
{
return lhs.first < rhs.first;
}
bool operator() (double lhs, const Datum& rhs) const
{
return lhs < rhs.first;
}
bool operator() (const Datum& lhs, double rhs) const
{
return lhs.first < rhs;
}
};
};
}
#endif
|