From 32902edf1f17bb62144f21ed38ae085bd2755e9f Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 21 Dec 2009 10:46:57 +0100 Subject: change namespace indentation to 0 A silly change, but this works better with other tools, like git diff. I should have started the C++ files this way. --- grapher/StapParser.hxx | 112 ++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) (limited to 'grapher/StapParser.hxx') diff --git a/grapher/StapParser.hxx b/grapher/StapParser.hxx index 169533b6..b410ab18 100644 --- a/grapher/StapParser.hxx +++ b/grapher/StapParser.hxx @@ -15,65 +15,65 @@ namespace systemtap { - // arguments and script for a stap process - struct StapProcess - { - StapProcess(pid_t pid_ = -1) : argv(0), pid(pid_) {} - std::string stapArgs; - std::string script; - std::string scriptArgs; - // arguments passed from a single array, like from the command line. - char **argv; - // -1 if the grapher is reading from stdin - pid_t pid; - }; +// arguments and script for a stap process +struct StapProcess +{ + StapProcess(pid_t pid_ = -1) : argv(0), pid(pid_) {} + std::string stapArgs; + std::string script; + std::string scriptArgs; + // arguments passed from a single array, like from the command line. + char **argv; + // -1 if the grapher is reading from stdin + pid_t pid; +}; - class StapParser +class StapParser +{ + std::string _buffer; + typedef std::map > DataMap; + DataMap _dataSets; + CSVData _csv; + int _errFd; + int _inFd; + unsigned char _lineEndChar; + bool _catchHUP; + std::tr1::shared_ptr _process; + sigc::connection _ioConnection; + sigc::connection _errIoConnection; +public: + StapParser() + : _errFd(-1), _inFd(-1), _lineEndChar('\n'), _catchHUP(false) + { + } + void parseData(std::tr1::shared_ptr gdata, + int64_t time, const std::string& dataString); + bool ioCallback(Glib::IOCondition ioCondition); + bool errIoCallback(Glib::IOCondition ioCondition); + int getErrFd() const { return _errFd; } + void setErrFd(int fd) { _errFd = fd; } + int getInFd() const { return _inFd; } + void setInFd(int fd) { _inFd = fd; } + pid_t getPid() const + { + if (_process) + return _process->pid; + else + return -1; + } + std::tr1::shared_ptr getProcess() { return _process; } + void setProcess(std::tr1::shared_ptr process) { - std::string _buffer; - typedef std::map > DataMap; - DataMap _dataSets; - CSVData _csv; - int _errFd; - int _inFd; - unsigned char _lineEndChar; - bool _catchHUP; - std::tr1::shared_ptr _process; - sigc::connection _ioConnection; - sigc::connection _errIoConnection; - public: - StapParser() - : _errFd(-1), _inFd(-1), _lineEndChar('\n'), _catchHUP(false) - { - } - void parseData(std::tr1::shared_ptr gdata, - int64_t time, const std::string& dataString); - bool ioCallback(Glib::IOCondition ioCondition); - bool errIoCallback(Glib::IOCondition ioCondition); - int getErrFd() const { return _errFd; } - void setErrFd(int fd) { _errFd = fd; } - int getInFd() const { return _inFd; } - void setInFd(int fd) { _inFd = fd; } - pid_t getPid() const - { - if (_process) - return _process->pid; - else - return -1; - } - std::tr1::shared_ptr getProcess() { return _process; } - void setProcess(std::tr1::shared_ptr process) - { - _process = process; - } - void initIo(int inFd, int errFd, bool catchHUP); - void disconnect(); - }; + _process = process; + } + void initIo(int inFd, int errFd, bool catchHUP); + void disconnect(); +}; - sigc::signal& childDiedSignal(); +sigc::signal& childDiedSignal(); - typedef std::vector > ParserList; - extern ParserList parsers; +typedef std::vector > ParserList; +extern ParserList parsers; - sigc::signal& parserListChangedSignal(); +sigc::signal& parserListChangedSignal(); } -- cgit