Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

XMLHandler.h

00001 /*
00002 Copyright (C) 2000,2001 Stefan Duffner 
00003 
00004 This program is free software; you can redistribute it and/or
00005 modify it under the terms of the GNU General Public License
00006 as published by the Free Software Foundation; either version 2
00007 of the License, or any later version.
00008 
00009 This program is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 GNU General Public License for more details.
00013 
00014 You should have received a copy of the GNU General Public License
00015 along with this program; if not, write to the Free Software
00016 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017 */
00018 
00019 #ifndef QXMLHANDLER_H
00020 #define QXMLHANDLER_H
00021 
00022 
00023 #include <qobject.h>
00024 #include <qxml.h>
00025 #include <qmap.h>
00026 
00027 #include "GState.h"
00028 #include "GTransition.h"
00029 
00030 class Project;
00031 class Machine;
00032 class GState;
00033 class GTransition;
00034 class GITransition;
00035 class Selection;
00036 
00041 class XMLHandler : public QObject, public QXmlDefaultHandler
00042 {
00043   Q_OBJECT
00044   public:
00045     XMLHandler::XMLHandler(Project* newProject, Selection* sel=NULL,bool keepquiet=TRUE, bool
00046         createnewmachine=TRUE);
00047     bool startDocument();
00048     bool startElement ( const QString & namespaceURI, const QString & localName, const
00049         QString & qName, const QXmlAttributes & atts );
00050     bool endElement( const QString&, const QString&, const QString& );
00051     bool characters ( const QString & ch );
00052     
00053   private:
00055     Project* project;
00057     Machine* machine;
00059     bool quiet;
00061     bool create_new_machine;
00063     Selection* selection;
00064 
00066     GState* state;
00068     GTransition* transition;
00070     GITransition* itransition;
00072     int saveinitialstate;
00074     QString inames;
00076     QString onames;
00078     QString monames;
00080     QString sname;
00082     bool inamescont;
00084     bool onamescont;
00086     bool monamescont;
00088     bool snamecont;
00090     bool hascode;
00092     int ttype;
00094     QString iinfo;
00096     QString oinfo;
00098     bool fromcont;
00100     bool tocont;
00102     bool tincont;
00104     bool toutcont;
00106     bool hasfrom;
00108     bool hasto;
00110     QString from;
00112     QString to;
00114     QValueList<int> rstatelist;
00116     QMap<int, int> codemap;
00118     bool addstate;
00120     bool hasinitialstate;
00122     QList<GState> undostatelist;
00124     QList<GTransition> undotranslist;
00126     GState *oldinitialstate;
00128     GState *newinitialstate;
00130     GITransition *oldinitialtrans;
00132     GITransition *newinitialtrans;
00134     int oldnumbits;
00136     int oldnumin;
00138     int oldnumout;
00139 };
00140 
00141 #endif
00142 

Generated at Fri Apr 11 22:37:14 2003 for Qfsm by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001