OGS
|
Reads and writes Observation Sites to and from XML files.
Definition at line 33 of file XmlStnInterface.h.
#include <XmlStnInterface.h>
Public Member Functions | |
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 (requires Qt) | |
bool | readFile (std::string const &fname) override |
Public Member Functions inherited from BaseLib::IO::Writer | |
Writer () | |
virtual | ~Writer ()=default |
std::string | writeToString () |
Writes the object to a string. | |
Public Member Functions inherited from BaseLib::IO::XMLQtInterface | |
XMLQtInterface (QString schemaFile="") | |
virtual | ~XMLQtInterface ()=default |
Protected Member Functions | |
bool | write () override |
Writes the object to the internal stream. This method must be implemented by a subclass. The implementation should return true on success, else false. | |
Protected Member Functions inherited from BaseLib::IO::XMLQtInterface | |
bool | checkHash () const |
QByteArray const & | getContent () const |
Private Member Functions | |
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. | |
void | writeBoreholeData (QDomDocument &doc, QDomElement &boreholeTag, GeoLib::StationBorehole *borehole) const |
Writes borehole-specific data to a station-xml-file. | |
void | readStratigraphy (const QDomNode &stratRoot, GeoLib::StationBorehole *borehole) |
Reads the stratigraphy of a borehole from an xml-file. | |
Private Attributes | |
GeoLib::GEOObjects & | _geo_objs |
Additional Inherited Members | |
Public Attributes inherited from BaseLib::IO::XMLInterface | |
std::string | export_name = {} |
Protected Attributes inherited from BaseLib::IO::Writer | |
std::ostringstream | out |
The stream to write to. | |
|
explicit |
Definition at line 32 of file XmlStnInterface.cpp.
|
overridevirtual |
Reads an xml-file containing station object definitions into the GEOObjects used in the constructor (requires Qt)
Reimplemented from BaseLib::IO::XMLQtInterface.
Definition at line 37 of file XmlStnInterface.cpp.
References _geo_objs, GeoLib::GEOObjects::addStationVec(), ERR(), BaseLib::IO::XMLQtInterface::getContent(), and readStations().
Referenced by MainWindow::loadFile(), FileIO::XmlPrjInterface::readFile(), and readFile().
|
inlineoverridevirtual |
Implements BaseLib::IO::XMLInterface.
Definition at line 42 of file XmlStnInterface.h.
References readFile().
|
private |
Reads GeoLib::Station- or StationBorehole-objects from an xml-file.
Definition at line 89 of file XmlStnInterface.cpp.
References GeoLib::Station::addSensorDataFromCSV(), GeoLib::StationBorehole::createStation(), BaseLib::joinPaths(), readStratigraphy(), GeoLib::Station::setStationValue(), and WARN().
Referenced by readFile().
|
private |
Reads the stratigraphy of a borehole from an xml-file.
Definition at line 190 of file XmlStnInterface.cpp.
References GeoLib::StationBorehole::addSoilLayer(), GeoLib::Station::getName(), and WARN().
Referenced by readStations().
|
overrideprotectedvirtual |
Writes the object to the internal stream. This method must be implemented by a subclass. The implementation should return true on success, else false.
Implements BaseLib::IO::Writer.
Definition at line 244 of file XmlStnInterface.cpp.
References _geo_objs, ERR(), BaseLib::IO::XMLInterface::export_name, getName(), GeoLib::GEOObjects::getStationVec(), BaseLib::IO::Writer::out, and writeBoreholeData().
|
private |
Writes borehole-specific data to a station-xml-file.
the first entry in the profile vector is just the position of the borehole
Definition at line 339 of file XmlStnInterface.cpp.
References BaseLib::date2string(), GeoLib::StationBorehole::getDate(), GeoLib::StationBorehole::getDepth(), GeoLib::StationBorehole::getProfile(), and GeoLib::StationBorehole::getSoilNames().
Referenced by write().
|
private |
Definition at line 64 of file XmlStnInterface.h.
Referenced by readFile(), and write().