Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

graphml.hpp

Go to the documentation of this file.
00001 /*
00002  Modular Psi - A graph tracker of the Parapsychologcal scientific development
00003  Copyright (C) 2005 Leonardo Stern
00004 
00005  This program is free software; you can redistribute it and/or modify it under
00006  the terms of the Common Public License Version 1.0 or (at your option) any later version.
00007 
00008  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
00009  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00010  See the Common Public License for more details.
00011 
00012  You should have received a copy of the Common Public License along with this program;
00013 */
00014 
00015 #ifndef GRAPHML_HPP
00016 #define GRAPHML_HPP
00017 
00018 #include <qxml.h>
00019 #include <qfile.h>
00020 #include "../propositiongraph.hpp"
00021 
00022 class GraphML : public QXmlDefaultHandler
00023 {
00024     public:
00025         GraphML(PropositionGraph* cl);
00026         ~GraphML();
00027         
00028     bool startElement(const QString &namespaceURI,
00029                       const QString &localName,
00030                       const QString &qName,
00031                       const QXmlAttributes &attribs);
00032     bool endElement(const QString &namespaceURI,
00033                     const QString &localName,
00034                     const QString &qName);
00035     bool characters(const QString &str);
00036     bool fatalError(const QXmlParseException &exception);
00040    PropositionGraph* caller;
00041     void ioError(const QFile file, const QString message);
00042     Edge* e;
00043     QString type;
00044     
00045     void loadProp(QString pname);
00046     void loadCat (QString dir);
00051     void save(QString dir);
00052     void saveProp(QString dir, QString prop);
00053     void init();
00054     QString currentItem;
00055     
00056 
00057 private:
00058     QString currentText;
00059 
00060 };
00061 
00062 
00063 #endif // GRAPHML_HPP
Untitled Document Pesquisa Psi SourceForge.net Logo