OGS
GocadAsciiReader.cpp File Reference

Detailed Description

Definition in file GocadAsciiReader.cpp.

Include dependency graph for GocadAsciiReader.cpp:

Go to the source code of this file.

Namespaces

namespace  FileIO
 
namespace  FileIO::Gocad
 
namespace  FileIO::Gocad::GocadAsciiReader
 

Enumerations

enum class  FileIO::Gocad::GocadAsciiReader::NodeType { FileIO::Gocad::GocadAsciiReader::UNSPECIFIED , FileIO::Gocad::GocadAsciiReader::VRTX , FileIO::Gocad::GocadAsciiReader::PVRTX }
 

Functions

void FileIO::Gocad::GocadAsciiReader::checkMeshNames (std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes)
 
bool FileIO::Gocad::GocadAsciiReader::isCommentLine (std::string const &str)
 Checks if the current line is a comment.
 
bool FileIO::Gocad::GocadAsciiReader::skipToEND (std::ifstream &in)
 Parses current section until END-tag is reached.
 
bool FileIO::Gocad::GocadAsciiReader::isKeyword (DataType const t, std::string const &line)
 Checks if current line is a designated keyword for a GoCAD data set.
 
DataType FileIO::Gocad::GocadAsciiReader::datasetFound (std::ifstream &in)
 Checks if a GoCAD data set begins at the current stream position.
 
void FileIO::Gocad::GocadAsciiReader::checkLineEndings (std::string const &file_name)
 Checks if current line is a designated keyword for a GoCAD data set.
 
bool FileIO::Gocad::GocadAsciiReader::parseHeader (std::ifstream &in, std::string &mesh_name)
 Parses the HEADER section (everything except the name is ignored right now)
 
bool FileIO::Gocad::GocadAsciiReader::parsePropertyClass (std::ifstream &in)
 
std::string FileIO::Gocad::GocadAsciiReader::propertyCheck (std::string const &string)
 Checks if the current line starts with one of the allowed keywords.
 
bool FileIO::Gocad::GocadAsciiReader::parseProperties (std::ifstream &in, std::vector< std::string > const &names, MeshLib::Properties &mesh_prop)
 
MeshLib::NodeFileIO::Gocad::GocadAsciiReader::createNode (std::stringstream &sstr)
 
bool FileIO::Gocad::GocadAsciiReader::parseAtomRegionIndicators (std::ifstream &in)
 
bool FileIO::Gocad::GocadAsciiReader::parseNodes (std::ifstream &in, std::vector< MeshLib::Node * > &nodes, std::map< std::size_t, std::size_t > &node_id_map, MeshLib::Properties const &mesh_prop)
 Parses the node data for the current mesh.
 
bool FileIO::Gocad::GocadAsciiReader::parseLineSegments (std::ifstream &in, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &elems, std::map< std::size_t, std::size_t > const &node_id_map, MeshLib::Properties &mesh_prop)
 Parses the segments of the current line.
 
bool FileIO::Gocad::GocadAsciiReader::parseLine (std::ifstream &in, std::vector< MeshLib::Node * > &nodes, std::vector< MeshLib::Element * > &elems, std::map< std::size_t, std::size_t > &node_id_map, MeshLib::Properties &mesh_prop)
 Parses line information (nodes, segments, properties)
 
bool FileIO::Gocad::GocadAsciiReader::parseElements (std::ifstream &in, std::vector< MeshLib::Node * > const &nodes, std::vector< MeshLib::Element * > &elems, std::map< std::size_t, std::size_t > const &node_id_map, MeshLib::Properties &mesh_prop)
 Parses the element data for the current mesh.
 
bool FileIO::Gocad::GocadAsciiReader::parseSurface (std::ifstream &in, std::vector< MeshLib::Node * > &nodes, std::vector< MeshLib::Element * > &elems, std::map< std::size_t, std::size_t > &node_id_map, MeshLib::Properties &mesh_prop)
 Parses the surface information (nodes, triangles, properties)
 
template<typename T >
MeshLib::MeshFileIO::Gocad::GocadAsciiReader::createMesh (std::ifstream &in, DataType type, std::string &mesh_name, MeshLib::Properties &mesh_prop, T parser, bool const flip_elevation)
 Converts parsed data into mesh.
 
MeshLib::MeshFileIO::Gocad::GocadAsciiReader::readData (std::ifstream &in, DataType const &type, std::string &mesh_name)
 Reads one mesh contained in the file (there may be more than one!)
 
bool FileIO::Gocad::GocadAsciiReader::readFile (std::string const &file_name, std::vector< std::unique_ptr< MeshLib::Mesh > > &meshes, DataType const export_type=DataType::ALL)
 Reads the specified file and writes data into internal mesh vector.
 

Variables

const std::string FileIO::Gocad::GocadAsciiReader::mat_id_name = "MaterialIDs"
 
const std::string FileIO::Gocad::GocadAsciiReader::eof_error = "Error: Unexpected end of file."