kpilot/lib
idmapperxml.h00001 #ifndef _KPILOT_IDMAPPERXML_H
00002 #define _KPILOT_IDMAPPERXML_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "idmapping.h"
00029
00030 #include <tqxml.h>
00031 #include <tqdom.h>
00032 #include <tqstring.h>
00033 #include <tqptrcollection.h>
00034
00035 class IDMapperXml : public QXmlDefaultHandler
00036 {
00037 public:
00038 IDMapperXml( const TQString &file );
00039
00040 ~IDMapperXml();
00041
00045 bool open();
00046
00052 void save();
00053
00057 void addMapping( const IDMapping &mapping );
00058
00062 TQValueList<IDMapping> &mappings();
00063
00067 bool startElement( const TQString &namespaceURI, const TQString &localName
00068 , const TQString &qName, const TQXmlAttributes &attribs );
00069
00073 bool endElement( const TQString &namespaceURI, const TQString &localName
00074 , const TQString &qName );
00075
00076 private:
00077 TQFile fFile;
00078 TQDomDocument doc;
00079 TQDomElement root;
00080 IDMapping *fCurrentMapping;
00081 TQValueList<IDMapping> fMappings;
00082 };
00083
00084 #endif
|