OGS
|
Definition at line 35 of file BoostXmlGmlInterface.h.
#include <BoostXmlGmlInterface.h>
Public Member Functions | |
BoostXmlGmlInterface (GeoLib::GEOObjects &geo_objs) | |
~BoostXmlGmlInterface () override=default | |
bool | readFile (const std::string &fname) override |
Reads an xml-file containing OGS geometry. | |
Public Member Functions inherited from BaseLib::IO::XMLInterface | |
Public Member Functions inherited from BaseLib::IO::Writer | |
Writer () | |
virtual | ~Writer ()=default |
std::string | writeToString () |
Writes the object to a string. | |
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::Writer |
Private Member Functions | |
void | readPoints (BaseLib::ConfigTree const &pointsRoot, std::vector< GeoLib::Point * > &points, std::map< std::string, std::size_t > &pnt_names) |
Reads GeoLib::Point-objects from an xml-file. | |
void | readPolylines (BaseLib::ConfigTree const &polylinesRoot, std::vector< GeoLib::Polyline * > &polylines, std::vector< GeoLib::Point * > const &points, const std::vector< std::size_t > &pnt_id_map, std::map< std::string, std::size_t > &ply_names) |
Reads GeoLib::Polyline-objects from an xml-file. | |
void | readSurfaces (BaseLib::ConfigTree const &surfacesRoot, std::vector< GeoLib::Surface * > &surfaces, std::vector< GeoLib::Point * > const &points, const std::vector< std::size_t > &pnt_id_map, std::map< std::string, std::size_t > &sfc_names) |
Reads GeoLib::Surface-objects from an xml-file. | |
void | addSurfacesToPropertyTree (boost::property_tree::ptree &geometry_set) |
void | addPolylinesToPropertyTree (boost::property_tree::ptree &geometry_set) |
Private Attributes | |
std::map< std::size_t, std::size_t > | _idx_map |
GeoLib::GEOObjects & | _geo_objects |
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 33 of file BoostXmlGmlInterface.cpp.
|
overridedefault |
|
private |
Definition at line 376 of file BoostXmlGmlInterface.cpp.
References _geo_objects, BaseLib::IO::XMLInterface::export_name, GeoLib::TemplateVec< T >::getNameOfElement(), GeoLib::Polyline::getNumberOfPoints(), GeoLib::Polyline::getPointID(), GeoLib::GEOObjects::getPolylineVecObj(), GeoLib::TemplateVec< T >::getVector(), and INFO().
Referenced by write().
|
private |
Definition at line 330 of file BoostXmlGmlInterface.cpp.
References _geo_objects, BaseLib::IO::XMLInterface::export_name, GeoLib::TemplateVec< T >::getNameOfElement(), GeoLib::Surface::getNumberOfTriangles(), GeoLib::GEOObjects::getSurfaceVecObj(), GeoLib::TemplateVec< T >::getVector(), and INFO().
Referenced by write().
|
overridevirtual |
Reads an xml-file containing OGS geometry.
Implements BaseLib::IO::XMLInterface.
Definition at line 38 of file BoostXmlGmlInterface.cpp.
References _geo_objects, GeoLib::GEOObjects::addPointVec(), GeoLib::GEOObjects::addPolylineVec(), GeoLib::GEOObjects::addSurfaceVec(), GeoLib::PointVec::getIDMap(), GeoLib::GEOObjects::getPointVec(), GeoLib::GEOObjects::getPointVecObj(), BaseLib::makeConfigTreeFromFile(), OGS_FATAL, readPoints(), readPolylines(), and readSurfaces().
Referenced by main(), anonymous_namespace{ProjectData.cpp}::readGeometry(), readGeometry(), and FileIO::readGeometryFromFile().
|
private |
Reads GeoLib::Point-objects from an xml-file.
Definition at line 103 of file BoostXmlGmlInterface.cpp.
References _idx_map, BaseLib::ConfigTree::getConfigParameterList(), BaseLib::insertIfKeyUniqueElseError(), and OGS_FATAL.
Referenced by readFile().
|
private |
Reads GeoLib::Polyline-objects from an xml-file.
Definition at line 140 of file BoostXmlGmlInterface.cpp.
References _idx_map, BaseLib::ConfigTree::getConfigSubtreeList(), BaseLib::insertIfKeyUniqueElseError(), OGS_FATAL, and WARN().
Referenced by readFile().
|
private |
Reads GeoLib::Surface-objects from an xml-file.
Definition at line 201 of file BoostXmlGmlInterface.cpp.
References _idx_map, BaseLib::ConfigTree::getConfigSubtreeList(), BaseLib::insertIfKeyUniqueElseError(), and OGS_FATAL.
Referenced by readFile().
|
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 271 of file BoostXmlGmlInterface.cpp.
References _geo_objects, addPolylinesToPropertyTree(), addSurfacesToPropertyTree(), ERR(), BaseLib::IO::XMLInterface::export_name, GeoLib::PointVec::getItemNameByID(), GeoLib::GEOObjects::getPointVecObj(), GeoLib::TemplateVec< T >::getVector(), and BaseLib::IO::Writer::out.
|
private |
Definition at line 71 of file BoostXmlGmlInterface.h.
Referenced by addPolylinesToPropertyTree(), addSurfacesToPropertyTree(), readFile(), and write().
|
private |
Definition at line 70 of file BoostXmlGmlInterface.h.
Referenced by readPoints(), readPolylines(), and readSurfaces().