summaryrefslogtreecommitdiff
path: root/src/levelhandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/levelhandler.h')
-rw-r--r--src/levelhandler.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/levelhandler.h b/src/levelhandler.h
new file mode 100644
index 0000000..533fdfe
--- /dev/null
+++ b/src/levelhandler.h
@@ -0,0 +1,41 @@
+// LevelHandler
+// Keeps track of levels (braces) in the RTF file.
+//
+
+#ifndef _LEVELHANDLER_H_
+#define _LEVELHANDLER_H_
+
+#include "RtfReader.h"
+#include "BaseHandler.h"
+#include "RtfParseHelpers.h"
+#include "Reference.h"
+
+class LevelHandler
+ : public BaseHandler
+{
+public:
+ LevelHandler();
+ virtual ~LevelHandler();
+
+ virtual void startDocument(RtfReader* reader);
+ virtual void endDocument();
+ virtual void groupStart();
+ virtual void groupEnd();
+
+ virtual DOM::Element getElement();
+
+ void pushLevel();
+ void popLevel();
+ void rewindLevel(LevelPtr ptr);
+ LevelPtr getLevel();
+
+
+protected:
+ virtual void clear();
+
+ LevelPtr m_topLevel;
+ LevelPtr m_curLevel;
+};
+
+
+#endif // _LEVELHANDLER_H_