OGS
XMLQtInterface.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <string>
7
8#include <QString>
9#include <QByteArray>
10
11class QFile;
12class QDomDocument;
13class QDomNode;
14class QDomElement;
15
16namespace BaseLib
17{
18namespace IO
19{
20
22{
23public:
24 explicit XMLQtInterface(QString schemaFile = "");
25 virtual ~XMLQtInterface() = default;
26
29 virtual int readFile(const QString &fileName);
30
31protected:
35 bool checkHash() const;
36
39 QByteArray const& getContent() const;
40
41private:
44 int isValid() const;
45
46private:
48 QString fileName_;
49
50 QString schemaFile_;
51
53 QByteArray fileData_;
54};
55
56} // end namespace IO
57} // 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.