summaryrefslogtreecommitdiffstats
path: root/grapher/StapParser.hxx
blob: 40add9fda4d36b65498dce01063347cd80da8cc1 (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
27
28
29
30
31
32
#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;
  int _inFd;
public:
  StapParser(Gtk::Window* win,
             GraphWidget* widget) : _win(win), _widget(widget), _errFd(-1),
                                    _inFd(-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; }
  int getInFd() { return _inFd; }
  void setInFd(int fd) { _inFd = fd; }
};
}