OGS
XMLQtInterface.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <string>
14
15#include <QString>
16#include <QByteArray>
17
18class QFile;
19class QDomDocument;
20class QDomNode;
21class QDomElement;
22
23namespace BaseLib
24{
25namespace IO
26{
27
29{
30public:
31 explicit XMLQtInterface(QString schemaFile = "");
32 virtual ~XMLQtInterface() = default;
33
36 virtual int readFile(const QString &fileName);
37
38protected:
42 bool checkHash() const;
43
46 QByteArray const& getContent() const;
47
48private:
51 int isValid() const;
52
53private:
55 QString fileName_;
56
57 QString schemaFile_;
58
60 QByteArray fileData_;
61};
62
63} // end namespace IO
64} // end namespace BaseLib
QByteArray fileData_
Caches the actual file contents when reading.
QByteArray const & getContent() const
virtual int readFile(const QString &fileName)
virtual ~XMLQtInterface()=default
XMLQtInterface(QString schemaFile="")
QString fileName_
The actual file name when reading.