OGS
XmlStnInterface.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <vector>
18
21
22namespace GeoLib {
23class GEOObjects;
24class Point;
25class StationBorehole;
26
27namespace IO
28{
29
35{
36public:
37 explicit XmlStnInterface(GeoLib::GEOObjects& geo_objs);
38
40 int readFile(const QString& fileName) override;
41
42 bool readFile(std::string const& fname) override
43 {
44 return readFile(QString(fname.c_str())) != 0;
45 }
46
47protected:
48 bool write() override;
49
50private:
52 void readStations(const QDomNode& stationsRoot,
53 std::vector<GeoLib::Point*>& stations,
54 const std::string& station_file_name);
55
57 void writeBoreholeData(QDomDocument &doc,
58 QDomElement &boreholeTag,
59 GeoLib::StationBorehole* borehole) const;
60
62 void readStratigraphy( const QDomNode &stratRoot, GeoLib::StationBorehole* borehole );
63
65};
66
67} // end namespace IO
68} // end namespace GeoLib
Definition of the XMLInterface class.
Container class for geometric objects.
Definition GEOObjects.h:57
Reads and writes Observation Sites to and from XML files.
void readStratigraphy(const QDomNode &stratRoot, GeoLib::StationBorehole *borehole)
Reads the stratigraphy of a borehole from an xml-file.
bool readFile(std::string const &fname) override
bool write() override
Writes the object to the internal stream. This method must be implemented by a subclass....
void readStations(const QDomNode &stationsRoot, std::vector< GeoLib::Point * > &stations, const std::string &station_file_name)
Reads GeoLib::Station- or StationBorehole-objects from an xml-file.
XmlStnInterface(GeoLib::GEOObjects &geo_objs)
int readFile(const QString &fileName) override
Reads an xml-file containing station object definitions into the GEOObjects used in the constructor (...
void writeBoreholeData(QDomDocument &doc, QDomElement &boreholeTag, GeoLib::StationBorehole *borehole) const
Writes borehole-specific data to a station-xml-file.
GeoLib::GEOObjects & _geo_objs
A borehole as a geometric object.
TemplateElement< PointRule1 > Point
Definition Point.h:20
Base class for writing any information to and from XML files.