xml-base.h
author insilmaril
Wed, 24 Oct 2007 14:41:34 +0000
changeset 614 040f32294895
parent 574 56fa27b2be3e
child 646 371945eb6d31
permissions -rw-r--r--
Fixed present flag
     1 #ifndef XML_BASE
     2 #define XML_BASE
     3 
     4 
     5 #include <QString>
     6 #include <QXmlAttributes>
     7 
     8 #include "file.h"
     9 #include "mapcenterobj.h"
    10 #include "mapeditor.h"
    11 
    12 
    13 /*! \brief Base class for parsing maps from XML documents */
    14 
    15 class parseBaseHandler  : public QXmlDefaultHandler
    16 {
    17 public:
    18 	parseBaseHandler();
    19 	~parseBaseHandler();
    20 	QString errorProtocol();
    21 	QString parseHREF(QString);
    22 	virtual bool startElement ( const QString&, const QString&,
    23                         const QString& eName, const QXmlAttributes& atts )=0; 
    24 	virtual bool   endElement ( const QString&, const QString&, const QString& )=0; 
    25 	virtual bool characters   ( const QString&)=0;
    26 
    27 	virtual QString errorString()=0;
    28 	bool fatalError( const QXmlParseException&);
    29 	void setMapEditor (MapEditor*);
    30 	void setTmpDir (QString);
    31 	void setInputFile (QString);
    32 	void setLoadMode (const LoadMode &);
    33 
    34 protected:
    35 	QString     errorProt;
    36 
    37 	LoadMode loadMode;
    38 	bool isVymPart;
    39 //	State state;			 
    40 //	State laststate;
    41 //	QList <State> stateStack;
    42 //	QString htmldata;
    43 	int branchDepth; 
    44 //	NoteObj no;
    45 	MapCenterObj* mc;
    46 	MapEditor* me; 
    47 	QString tmpDir; 
    48 	QString inputFile;
    49 }; 
    50 #endif