File indexing completed on 2024-04-14 03:40:31

0001 /***************************************************************************
0002  *   Copyright (C) 2004-2006 by Albert Astals Cid                          *
0003  *   aacid@kde.org                                                         *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #ifndef MAPPARSER_H
0012 #define MAPPARSER_H
0013 
0014 class QDomElement;
0015 
0016 class KGmap;
0017 #include <QString>
0018 
0019 class mapReader
0020 {
0021     public:
0022         mapReader();
0023         
0024         KGmap *parseMap(const QString &path);
0025         QString getError() const;
0026     
0027     private:
0028         enum eMandatoryness { Mandatory, Optional };
0029         QString getElementString(const QString &tagName, const QDomElement &parentTag, eMandatoryness mandatoryness);
0030         QDomElement getElement(const QString &tagName, const QDomElement &parentTag);
0031     
0032         QString p_error;
0033 };
0034 
0035 #endif