diff options
author | David Smith <dsmith@redhat.com> | 2009-04-20 13:55:45 -0500 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2009-04-20 13:55:45 -0500 |
commit | d1b6c2866b35575219fb36fa2307c9f87e876750 (patch) | |
tree | 4cc6d22bb879f302259074da840c279ee0b3c185 /grapher/GraphData.hxx | |
parent | cfee927fb9fc96fa06c55219abce6349a15d47e6 (diff) | |
parent | 555b11c26094bafa5e450d8ad70b72a8fcbea10f (diff) | |
download | systemtap-steved-d1b6c2866b35575219fb36fa2307c9f87e876750.tar.gz systemtap-steved-d1b6c2866b35575219fb36fa2307c9f87e876750.tar.xz systemtap-steved-d1b6c2866b35575219fb36fa2307c9f87e876750.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
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 |