diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:41 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:41 +0200 |
| commit | 9cd3ccffd5372dfde3af478e3f832f18db4be3f1 (patch) | |
| tree | 631c295a4a4a16b57502b847626763a279bf6df7 /yhttpd-0.7.2/src/monitor/dump.h | |
| parent | 13aaf70af703748fe096e0664c305cd202637ad2 (diff) | |
tagging tags
Diffstat (limited to 'yhttpd-0.7.2/src/monitor/dump.h')
| -rw-r--r-- | yhttpd-0.7.2/src/monitor/dump.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/yhttpd-0.7.2/src/monitor/dump.h b/yhttpd-0.7.2/src/monitor/dump.h new file mode 100644 index 0000000..8e84cb1 --- /dev/null +++ b/yhttpd-0.7.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("<unsigned>"); } + + void add(int i_num) + { add("<int>"); } + + 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<string> &vec_params); +public: + dump(vector<string> vec_params); +}; + +#endif |
