diff -r 000000000000 -r 24bfecc949a0 xml-base.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml-base.h Thu Nov 08 15:28:03 2007 +0000 @@ -0,0 +1,50 @@ +#ifndef XML_BASE +#define XML_BASE + + +#include +#include + +#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 stateStack; +// QString htmldata; + int branchDepth; +// NoteObj no; + MapCenterObj* mc; + MapEditor* me; + QString tmpDir; + QString inputFile; +}; +#endif