summaryrefslogtreecommitdiffstats
path: root/grapher/GraphData.hxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-04-21 11:11:02 -0400
committerDave Brolley <brolley@redhat.com>2009-04-21 11:11:02 -0400
commit09fd19d66b9e3318e9e33f604eb2dbe623955123 (patch)
tree073dc18e4ca3ca4bac674c7225a9a54e5fafc7f7 /grapher/GraphData.hxx
parentd4935c2f80122827a02d9f66c020d7e8ef6d6ade (diff)
parent9a6d143c6e2c79cee1082d0455da92cfa78b03c7 (diff)
downloadsystemtap-steved-09fd19d66b9e3318e9e33f604eb2dbe623955123.tar.gz
systemtap-steved-09fd19d66b9e3318e9e33f604eb2dbe623955123.tar.xz
systemtap-steved-09fd19d66b9e3318e9e33f604eb2dbe623955123.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Conflicts: aclocal.m4 configure
Diffstat (limited to 'grapher/GraphData.hxx')
-rw-r--r--grapher/GraphData.hxx44
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