summaryrefslogtreecommitdiff
path: root/yhttpd/src/monitor/dump.h
diff options
context:
space:
mode:
Diffstat (limited to 'yhttpd/src/monitor/dump.h')
-rw-r--r--yhttpd/src/monitor/dump.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/yhttpd/src/monitor/dump.h b/yhttpd/src/monitor/dump.h
new file mode 100644
index 0000000..ffb3529
--- /dev/null
+++ b/yhttpd/src/monitor/dump.h
@@ -0,0 +1,62 @@
+#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