Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

XMLParser.h

00001 #ifndef XMLPARSER_H
00002 #define XMLPARSER_H
00003 #include <qxml.h>
00004 #include <qstack.h>
00005 #include "Score.h"
00006 #include "ErrorHandler.h"
00007 #include "Score.h"
00008 #include "../marker/XMLMarker.h"
00009 #include "../marker/XMLMarkerFactory.h"
00010 #include "../marker/Score_partwise.h"
00011 
00015 class MusicXMLHandler:public QXmlContentHandler
00016 {
00017   int state;
00018   QString error;
00019     QStack < XMLMarker > pile;
00020   XMLMarker *marker;
00021   QXmlLocator *locator;
00022   /*
00023    * Method called at the beginning of a document 
00024    */
00025 public:
00026     ScoreMusic * getScore ();
00027     MusicXMLHandler ();
00028   bool startDocument ();
00029   void setDocumentLocator (QXmlLocator *);
00030   bool endDocument ();
00031   bool startElement (const QString &, const QString &, const QString &,
00032                      const QXmlAttributes &);
00033   bool endElement (const QString &, const QString &, const QString &);
00034   bool characters (const QString &);
00035   bool startPrefixMapping (const QString &, const QString &);
00036   bool endPrefixMapping (const QString &);
00037   bool ignorableWhitespace (const QString &);
00038   bool processingInstruction (const QString &, const QString &);
00039   bool skippedEntity (const QString &);
00040   QString errorString ();
00041 
00042 };
00046 class MusicXMLParser:public QXmlSimpleReader
00047 {
00048   MusicXMLHandler contentHandler;
00049   MusicXMLErrorHandler errorHandler;
00050   bool parsingDone;
00051 public:
00052     ScoreMusic * getScore ();
00053     MusicXMLParser ();
00054 
00055   //  bool parse(const QXMLSource&);
00056 };
00057 #endif

Generated on Tue Jun 1 21:13:30 2004 for Alternate Take by doxygen 1.3.6