From 9cd3ccffd5372dfde3af478e3f832f18db4be3f1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Apr 2013 13:14:41 +0200 Subject: tagging tags --- ychat-0.7.9.2/src/monitor/dump.h | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 ychat-0.7.9.2/src/monitor/dump.h (limited to 'ychat-0.7.9.2/src/monitor/dump.h') diff --git a/ychat-0.7.9.2/src/monitor/dump.h b/ychat-0.7.9.2/src/monitor/dump.h new file mode 100644 index 0000000..8e84cb1 --- /dev/null +++ b/ychat-0.7.9.2/src/monitor/dump.h @@ -0,0 +1,51 @@ +#include "../incl.h" + +#ifndef DUMP_H +#define DUMP_H + +using namespace std; + +class dumpable +{ +private: + int i_level; + int i_lined; + bool b_lined; + bool b_next_no_nl; + string s_dump; + + static const string s_sep; + static const int i_max_level; + + virtual void dumpit() = 0; + void initialize(int i_level); + void reset(); + +protected: + void add(unsigned i_num) + { add(""); } + + void add(int i_num) + { add(""); } + + void add(string s_line); + dumpable(); + + void next_no_newline() + { b_next_no_nl = true; } + +public: + string dump(); + string dump(int i_level); + int get_level() const; +}; + +class dump +{ +private: + string run(vector &vec_params); +public: + dump(vector vec_params); +}; + +#endif -- cgit v1.2.3