File: xml-base.h

package info (click to toggle)
vym 1.10.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,376 kB
  • ctags: 1,926
  • sloc: cpp: 18,468; xml: 277; sh: 211; perl: 89; makefile: 26
file content (50 lines) | stat: -rw-r--r-- 1,135 bytes parent folder | download
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
42
43
44
45
46
47
48
49
50
#ifndef XML_BASE
#define XML_BASE


#include <QString>
#include <QXmlAttributes>

#include "file.h"
#include "mapcenterobj.h"
#include "mapeditor.h"


/*! \brief Base class for parsing maps from XML documents */

class parseBaseHandler  : public QXmlDefaultHandler
{
public:
	parseBaseHandler();
	~parseBaseHandler();
	QString errorProtocol();
	QString parseHREF(QString);
	virtual bool startElement ( const QString&, const QString&,
                        const QString& eName, const QXmlAttributes& atts )=0; 
	virtual bool   endElement ( const QString&, const QString&, const QString& )=0; 
	virtual bool characters   ( const QString&)=0;

	virtual QString errorString()=0;
	bool fatalError( const QXmlParseException&);
	void setMapEditor (MapEditor*);
	void setTmpDir (QString);
	void setInputFile (QString);
	void setLoadMode (const LoadMode &);

protected:
	QString     errorProt;

	LoadMode loadMode;
	bool isVymPart;
//	State state;			 
//	State laststate;
//	QList <State> stateStack;
//	QString htmldata;
	int branchDepth; 
//	NoteObj no;
	MapCenterObj* mc;
	MapEditor* me; 
	QString tmpDir; 
	QString inputFile;
}; 
#endif