From 4bf8ba6e4fc0a950301e5debedababa834ea0d10 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 21 Oct 2009 17:05:59 +0200 Subject: More refactoring for multiple stap processes. * grapher/StapParser.hxx (StapParser): Change _win and _widget from references to pointers. * grapher/StapParser.cxx (ioCallback): Ditto. * grapher/grapher.cxx (StapLauncher, GraphicalStapLauncher): Rewrite to make GraphicalStapLauncher a derived class of StapLauncher. (main): Accept graphing data from stdin with a "-" argument. --- grapher/StapParser.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'grapher/StapParser.cxx') diff --git a/grapher/StapParser.cxx b/grapher/StapParser.cxx index eea85006..249836d3 100644 --- a/grapher/StapParser.cxx +++ b/grapher/StapParser.cxx @@ -63,7 +63,7 @@ vector commaSplit(const boost::sub_range& range) using namespace boost; if (ioCondition & Glib::IO_HUP) { - _win.hide(); + _win->hide(); return true; } if ((ioCondition & Glib::IO_IN) == 0) @@ -73,7 +73,7 @@ vector commaSplit(const boost::sub_range& range) bytes_read = read(_inFd, buf, sizeof(buf) - 1); if (bytes_read <= 0) { - _win.hide(); + _win->hide(); return true; } buf[bytes_read] = '\0'; @@ -108,7 +108,7 @@ vector commaSplit(const boost::sub_range& range) dataSet->color[2] = (hexColor & 0xff) / 255.0; dataSet->scale = scale; _dataSets.insert(std::make_pair(setName, dataSet)); - _widget.addGraphData(dataSet); + _widget->addGraphData(dataSet); } else if (style == "discreet") { @@ -120,7 +120,7 @@ vector commaSplit(const boost::sub_range& range) dataSet->color[2] = (hexColor & 0xff) / 255.0; dataSet->scale = scale; _dataSets.insert(std::make_pair(setName, dataSet)); - _widget.addGraphData(dataSet); + _widget->addGraphData(dataSet); } } else if ((found = find_first(dataString, "%CSV:"))) @@ -219,7 +219,7 @@ vector commaSplit(const boost::sub_range& range) bytes_read = read(_errFd, buf, sizeof(buf) - 1); if (bytes_read <= 0) { - _win.hide(); + _win->hide(); return true; } if (write(STDOUT_FILENO, buf, bytes_read) < 0) -- cgit