xml-base.h
author insilmaril
Tue Jul 07 09:34:24 2009 +0000 (2009-07-07)
changeset 779 1fb50e79661c
parent 646 371945eb6d31
child 847 43268373032d
permissions -rw-r--r--
Hiding of links works again
     1 #ifndef XML_BASE
     2 #define XML_BASE
     3 
     4 
     5 #include <QString>
     6 #include <QXmlAttributes>
     7 
     8 #include "file.h"
     9 #include "mapeditor.h"
    10 #include "vymmodel.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 setModel (VymModel *);
    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 	VymModel *model;
    46 	QString tmpDir; 
    47 	QString inputFile;
    48 }; 
    49 #endif