From 5f4f8b1129659adb2015ce42821faccf8fe6d8d5 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 27 May 2009 10:32:51 +0200 Subject: 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 --- grapher/StapParser.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'grapher/StapParser.hxx') 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 > DataMap; + typedef std::map > 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 gdata, + double time, const std::string& dataString); bool ioCallback(Glib::IOCondition ioCondition); }; -- cgit