Developer Documentation
|
Read/Write mesh data from/to files. More...
#include <Type-OpenVolumeMesh/libs/OpenVolumeMesh/src/OpenVolumeMesh/FileManager/FileManager.hh>
Public Member Functions | |
FileManager () | |
Default constructor. | |
~FileManager () | |
Default destructor. | |
void | setVerbosityLevel (int _level) |
set minimum level for errors that are printed to std::cerr More... | |
template<class MeshT > | |
bool | readStream (std::istream &_istream, MeshT &_mesh, bool _topologyCheck=true, bool _computeBottomUpIncidences=true) const |
Read a mesh from an std::istream. More... | |
template<class MeshT > | |
bool | readFile (const std::string &_filename, MeshT &_mesh, bool _topologyCheck=true, bool _computeBottomUpIncidences=true) const |
Read a mesh from a file. More... | |
template<class MeshT > | |
void | writeStream (std::ostream &_ostream, const MeshT &_mesh) const |
Write a mesh to an std::ostream. More... | |
template<class MeshT > | |
bool | writeFile (const std::string &_filename, const MeshT &_mesh) const |
Write a mesh to a file. More... | |
bool | isHexahedralMesh (const std::string &_filename) const |
Test whether given file contains a hexahedral mesh. | |
bool | isTetrahedralMesh (const std::string &_filename) const |
Test whether given file contains a tetrahedral mesh. | |
Private Attributes | |
int | verbosity_level_ = 3 |
Read/Write mesh data from/to files.
Definition at line 63 of file FileManager.hh.
bool OpenVolumeMesh::IO::FileManager::readFile | ( | const std::string & | _filename, |
MeshT & | _mesh, | ||
bool | _topologyCheck = true , |
||
bool | _computeBottomUpIncidences = true |
||
) | const |
Read a mesh from a file.
Returns true if the file was successfully read. The mesh is stored in parameter _mesh. If something goes wrong, this function returns false.
_filename | The file that is to be read |
_mesh | A reference to an OpenVolumeMesh instance |
_topologyCheck | Pass true if you want to perform a topology check each time an entity is added (slower performance) |
_computeBottomUpIncidences | Pass true if you want the file manager to directly compute the bottom-up incidences for the mesh. (Note: These are needed for some iterators to work, see documentation) |
Definition at line 308 of file FileManagerT_impl.hh.
bool OpenVolumeMesh::IO::FileManager::readStream | ( | std::istream & | _istream, |
MeshT & | _mesh, | ||
bool | _topologyCheck = true , |
||
bool | _computeBottomUpIncidences = true |
||
) | const |
Read a mesh from an std::istream.
Returns true if the file was successfully read. The mesh is stored in parameter _mesh. If something goes wrong, this function returns false.
_istream | The stream to read the mesh from |
_mesh | A reference to an OpenVolumeMesh instance |
_topologyCheck | Pass true if you want to perform a topology check each time an entity is added (slower performance) |
_computeBottomUpIncidences | Pass true if you want the file manager to directly compute the bottom-up incidences for the mesh. (Note: These are needed for some iterators to work, see documentation) |
Definition at line 67 of file FileManagerT_impl.hh.
|
inline |
set minimum level for errors that are printed to std::cerr
_level | 0: no output; 1: only errors; 2: warnings/info |
Definition at line 77 of file FileManager.hh.
bool OpenVolumeMesh::IO::FileManager::writeFile | ( | const std::string & | _filename, |
const MeshT & | _mesh | ||
) | const |
Write a mesh to a file.
Returns true if the file was successfully written. The mesh is passed as parameter _mesh. If something goes wrong, this function returns false.
_filename | The file that is to be stored |
_mesh | A const reference to an OpenVolumeMesh instance |
Definition at line 517 of file FileManagerT_impl.hh.
void OpenVolumeMesh::IO::FileManager::writeStream | ( | std::ostream & | _ostream, |
const MeshT & | _mesh | ||
) | const |
Write a mesh to an std::ostream.
_ostream | The stream to write the mesh to |
_mesh | A const reference to an OpenVolumeMesh instance |
Definition at line 425 of file FileManagerT_impl.hh.