Initial commit

This commit is contained in:
2017-09-19 08:27:10 +02:00
commit 3b2e49f7b7
138 changed files with 199299 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
///
/// \file loadCollectionXMLParser.h
/// \author Jan Chrin, George Prekas, PSI
/// \date Release: February 2015
/// \version CAFE 1.0.0
///
#include <config.h>
#if HAVE_LIBQTXML
#ifndef LOADCOLLECTIONXMLPARSER_H
#define LOADCOLLECTIONXMLPARSER_H
#include "deviceCollection.h"
#include <QtXml/QXmlDefaultHandler>
class loadCollectionXMLParser : public QXmlDefaultHandler {
public:
loadCollectionXMLParser();
virtual ~loadCollectionXMLParser();
bool startElement(const QString& namespaceURI,
const QString& localName,
const QString& qName,
const QXmlAttributes& atts);
bool endElement (const QString& namespaceURI,
const QString& localName,
const QString& qName);
bool characters (const QString& ch);
std::vector<deviceCollection> deviceCollectionV;
private:
enum
{
NotWaiting,
WaitingForDescription,
WaitingForDevice,
WaitingForAttribute
} state;
deviceCollection devCollection;
collectionMember cMember;
std::string attributeName;
static const QString& tagConfig;
static const QString& tagGroup;
static const QString& tagDescription;
static const QString& tagAttributes;
static const QString& tagAttribute;
static const QString& tagMember;
static const QString& tagDevice;
};
#endif
#endif // LOADCOLLECTIONXMLPARSER_H