43 #ifndef FILEMANAGER_HH_ 44 #define FILEMANAGER_HH_ 94 template <
class MeshT>
95 bool readStream(std::istream &_istream, MeshT& _mesh,
96 bool _topologyCheck =
true,
97 bool _computeBottomUpIncidences =
true)
const;
115 template <
class MeshT>
116 bool readFile(
const std::string& _filename, MeshT& _mesh,
117 bool _topologyCheck =
true,
118 bool _computeBottomUpIncidences =
true)
const;
127 template <
class MeshT>
128 void writeStream(std::ostream &_ostream,
const MeshT& _mesh)
const;
140 template <
class MeshT>
141 bool writeFile(
const std::string& _filename,
const MeshT& _mesh)
const;
158 template <
class MeshT>
159 void readProperty(std::istream& _iff, MeshT& _mesh)
const;
161 template <
class PropT,
class MeshT>
162 void generateGenericProperty(
const std::string& _entity_t,
const std::string& _name,
163 std::istream& _iff, MeshT& _mesh)
const;
166 template<
class IteratorT>
167 void writeProps(std::ostream& _ostr,
const IteratorT& _begin,
const IteratorT& _end)
const;
170 void trimString(std::string& _string)
const;
173 void extractQuotedText(std::string& _string)
const;
176 bool getCleanLine(std::istream& ifs, std::string& _string,
bool _skipEmptyLines =
true)
const;
179 int verbosity_level_ = 3;
186 #if defined(INCLUDE_TEMPLATES) && !defined(FILEMANAGERT_CC) 187 #include "FileManagerT_impl.hh"
Read/Write mesh data from/to files.
bool writeFile(const std::string &_filename, const MeshT &_mesh) const
Write a mesh to a file.
bool isTetrahedralMesh(const std::string &_filename) const
Test whether given file contains a tetrahedral mesh.
~FileManager()
Default destructor.
void setVerbosityLevel(int _level)
set minimum level for errors that are printed to std::cerr
void writeStream(std::ostream &_ostream, const MeshT &_mesh) const
Write a mesh to an std::ostream.
FileManager()
Default constructor.
bool readFile(const std::string &_filename, MeshT &_mesh, bool _topologyCheck=true, bool _computeBottomUpIncidences=true) const
Read a mesh from a file.
bool readStream(std::istream &_istream, MeshT &_mesh, bool _topologyCheck=true, bool _computeBottomUpIncidences=true) const
Read a mesh from an std::istream.
bool isHexahedralMesh(const std::string &_filename) const
Test whether given file contains a hexahedral mesh.