summaryrefslogtreecommitdiffstats
path: root/grapher/StapParser.hxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-05-27 10:32:51 +0200
committerTim Moore <timoore@redhat.com>2009-07-28 10:17:29 +0200
commit5f4f8b1129659adb2015ce42821faccf8fe6d8d5 (patch)
tree9fdb07036f2461a01f8efa1f5d07f496191e71bc /grapher/StapParser.hxx
parent95ddfc079a1d9affdb285f7690f8d5623cd7124a (diff)
downloadsystemtap-steved-5f4f8b1129659adb2015ce42821faccf8fe6d8d5.tar.gz
systemtap-steved-5f4f8b1129659adb2015ce42821faccf8fe6d8d5.tar.xz
systemtap-steved-5f4f8b1129659adb2015ce42821faccf8fe6d8d5.zip
Templatize GraphData
* grapher/GraphData.hxx (GraphDataBase): new superclass for GraphData. Split time data out as a separate vector. (GraphData): Rewrite as template. * grapher/GraphWidget.cxx (on_expose_event): Reflect GraphData templatization. Handle events with string values. * grapher/GraphWidget.hxx (GraphWidget): Keep pointers to GraphDataBase objects instead of GraphData. * grapher/StapParser.cxx (parseData): new member function (ioCallback): Handle new discreet event * grapher/StapParser.hxx (StapParser): keep pointers to GraphDataBase objects instead of GraphData * testsuite/systemtap.examples/general/grapher.stp: Display actual key pressed for keyboard event
Diffstat (limited to 'grapher/StapParser.hxx')
-rw-r--r--grapher/StapParser.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/grapher/StapParser.hxx b/grapher/StapParser.hxx
index 624accc7..e11e7302 100644
--- a/grapher/StapParser.hxx
+++ b/grapher/StapParser.hxx
@@ -7,7 +7,7 @@ namespace systemtap
class StapParser
{
std::string _buffer;
- typedef std::map<std::string, std::tr1::shared_ptr<GraphData> > DataMap;
+ typedef std::map<std::string, std::tr1::shared_ptr<GraphDataBase> > DataMap;
DataMap _dataSets;
CSVData _csv;
Gtk::Window& _win;
@@ -15,7 +15,8 @@ class StapParser
public:
StapParser(Gtk::Window& win,
GraphWidget& widget) : _win(win), _widget(widget) {}
-
+ void parseData(std::tr1::shared_ptr<GraphDataBase> gdata,
+ double time, const std::string& dataString);
bool ioCallback(Glib::IOCondition ioCondition);
};