summaryrefslogtreecommitdiffstats
path: root/grapher/StapParser.hxx
blob: f4f6bdefe0183a5cfa034581d8d9fe046792d1b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "GraphData.hxx"
#include "GraphWidget.hxx"

#include <string>
namespace systemtap
{
class StapParser
{
  std::string _buffer;
  typedef std::map<std::string, std::tr1::shared_ptr<GraphDataBase> > DataMap;
  DataMap _dataSets;
  CSVData _csv;
  Gtk::Window& _win;
  GraphWidget& _widget;
  int _errFd;
public:
  StapParser(Gtk::Window& win,
             GraphWidget& widget) : _win(win), _widget(widget), _errFd(-1) {}
  void parseData(std::tr1::shared_ptr<GraphDataBase> gdata,
                 double time, const std::string& dataString);
  bool ioCallback(Glib::IOCondition ioCondition);
  bool errIoCallback(Glib::IOCondition ioCondition);
  int getErrFd() { return _errFd; }
  void setErrFd(int fd) { _errFd = fd; }
};
}