blob: 476b00716b7e22b67dc5480666831cd8ceb96e92 (
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
33
34
35
36
37
38
39
40
41
|
// systemtap grapher
// Copyright (C) 2009 Red Hat Inc.
//
// This file is part of systemtap, and is free software. You can
// redistribute it and/or modify it under the terms of the GNU General
// Public License (GPL); either version 2, or (at your option) any
// later version.
#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;
unsigned char _lineEndChar;
public:
StapParser(Gtk::Window* win,
GraphWidget* widget) : _win(win), _widget(widget), _errFd(-1),
_inFd(-1), _lineEndChar('\n')
{
}
void parseData(std::tr1::shared_ptr<GraphDataBase> gdata,
int64_t 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; }
};
}
|