diff options
author | Stef Walter <stef@memberwebs.com> | 2004-07-22 22:30:48 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-07-22 22:30:48 +0000 |
commit | 879f4addd4c94492c21c36c0be98122a879907bf (patch) | |
tree | 81dba160573131e476cad13e8421aff07ccb5d11 /src/levelhandler.h | |
parent | 7c93b2bab50b1ee28aee190a064b11daed247d83 (diff) |
- Comments and formatting changes.
Diffstat (limited to 'src/levelhandler.h')
-rw-r--r-- | src/levelhandler.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/levelhandler.h b/src/levelhandler.h index 3077c13..bee1a8e 100644 --- a/src/levelhandler.h +++ b/src/levelhandler.h @@ -44,36 +44,49 @@ #define __LEVELHANDLER_H__ #include "rtfreader.h" -#include "basehandler.h" -#include "rtfparsehelpers.h" #include "reference.h" +#include "rtfparsehelpers.h" +/* + * LevelHandler + * + * A base class that manages a set of Levels (see XMLComposeHelpers.cpp) + * based on the RTF groups seen. + */ class LevelHandler - : public BaseHandler + : public RTFHandler { public: LevelHandler(); virtual ~LevelHandler(); - virtual void startDocument(RtfReader* reader); + // Overrides + virtual void startDocument(RtfParser* parser); virtual void endDocument(); virtual void groupStart(); virtual void groupEnd(); + // Convenience function to get XML element from current level virtual DOM::Element getElement(); + // Create a new level on top of stack void pushLevel(); + + // Pop top level and discard void popLevel(); + + // Back out all the way past a given level void rewindLevel(LevelPtr ptr); - LevelPtr getLevel(); + // Get the current level + LevelPtr getLevel(); protected: virtual void clear(); - LevelPtr m_topLevel; - LevelPtr m_curLevel; + LevelPtr m_topLevel; // First level + LevelPtr m_curLevel; // The current level + RtfParser* m_parser; // The parser we're listening to }; - #endif // __LEVELHANDLER_H__ |