summaryrefslogtreecommitdiff
path: root/src/levelhandler.h
blob: 533fdfe8c5694d0bff50c4ab6c232b3ab9685b89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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_