loadCollectionXMLParser.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 #include <config.h>
00010 
00011 #if HAVE_LIBQTXML
00012 
00013 #ifndef LOADCOLLECTIONXMLPARSER_H
00014 #define LOADCOLLECTIONXMLPARSER_H
00015 
00016 #include "deviceCollection.h"
00017 
00018 #include <QtXml/QXmlDefaultHandler>
00019 
00020 
00021 class loadCollectionXMLParser : public QXmlDefaultHandler {
00022 public:
00023     loadCollectionXMLParser();
00024     virtual ~loadCollectionXMLParser();
00025     bool startElement(const QString& namespaceURI,
00026                       const QString& localName,
00027                       const QString& qName,
00028                       const QXmlAttributes& atts);
00029     bool endElement  (const QString& namespaceURI,
00030                       const QString& localName,
00031                       const QString& qName);
00032     bool characters  (const QString& ch);
00033 
00034     std::vector<deviceCollection> deviceCollectionV;
00035 
00036 private:
00037     enum
00038     {
00039         NotWaiting,
00040         WaitingForDescription,
00041         WaitingForDevice,
00042         WaitingForAttribute
00043     } state;
00044 
00045     deviceCollection devCollection;
00046     collectionMember cMember;
00047     std::string      attributeName;
00048     static const QString& tagConfig;
00049     static const QString& tagGroup;
00050     static const QString& tagDescription;
00051     static const QString& tagAttributes;
00052     static const QString& tagAttribute;
00053     static const QString& tagMember;
00054     static const QString& tagDevice;
00055 };
00056 
00057 #endif
00058 
00059 
00060 #endif // LOADCOLLECTIONXMLPARSER_H

Generated on 3 May 2017 for CAFE by  doxygen 1.6.1