diff options
author | Tim Moore <timoore@redhat.com> | 2009-04-20 08:13:38 +0200 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-04-20 08:13:38 +0200 |
commit | a6e65750e80380d42ea238f3c688c3499de16d74 (patch) | |
tree | f5ef0b9df733e04d405b969d2fc6290d5ddce773 /grapher/GraphData.hxx | |
parent | 2d45e339f3287cf0b4805ea91b3aa9f17b6d4752 (diff) | |
download | systemtap-steved-a6e65750e80380d42ea238f3c688c3499de16d74.tar.gz systemtap-steved-a6e65750e80380d42ea238f3c688c3499de16d74.tar.xz systemtap-steved-a6e65750e80380d42ea238f3c688c3499de16d74.zip |
Move grapher to subdirectory
Diffstat (limited to 'grapher/GraphData.hxx')
-rw-r--r-- | grapher/GraphData.hxx | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/grapher/GraphData.hxx b/grapher/GraphData.hxx new file mode 100644 index 00000000..0f3b0b31 --- /dev/null +++ b/grapher/GraphData.hxx @@ -0,0 +1,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 |