Commit bfab09e5 authored by Mike Kremer's avatar Mike Kremer

FInished ascii file reader.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@59 66977474-1d4b-4f09-8fe9-267525286df2
parent aac1d735
...@@ -119,8 +119,33 @@ private: ...@@ -119,8 +119,33 @@ private:
// Get a whole line from file // Get a whole line from file
bool getCleanLine(std::istream& ifs, std::string& _string, bool _skipEmptyLines = true) const; bool getCleanLine(std::istream& ifs, std::string& _string, bool _skipEmptyLines = true) const;
// Parse properties
template<class MeshT, typename IterT>
void parseVertexProperties(std::ifstream& _iff, std::stringstream& _sstr, const std::string& _identifier, MeshT& _mesh,
const IterT& _begin, const IterT& _end) const;
template<class MeshT, typename IterT>
void parseEdgeProperties(std::ifstream& _iff, std::stringstream& _sstr, const std::string& _identifier, MeshT& _mesh,
const IterT& _begin, const IterT& _end) const;
template<class MeshT, typename IterT>
void parseHalfEdgeProperties(std::ifstream& _iff, std::stringstream& _sstr, const std::string& _identifier, MeshT& _mesh,
const IterT& _begin, const IterT& _end) const;
template<class MeshT, typename IterT>
void parseFaceProperties(std::ifstream& _iff, std::stringstream& _sstr, const std::string& _identifier, MeshT& _mesh,
const IterT& _begin, const IterT& _end) const;
template<class MeshT, typename IterT>
void parseHalfFaceProperties(std::ifstream& _iff, std::stringstream& _sstr, const std::string& _identifier, MeshT& _mesh,
const IterT& _begin, const IterT& _end) const;
template<class MeshT, typename IterT>
void parseCellProperties(std::ifstream& _iff, std::stringstream& _sstr, const std::string& _identifier, MeshT& _mesh,
const IterT& _begin, const IterT& _end) const;
// Add and initialize property // Add and initialize property
template<class MeshT, class PropHandleT, typename PropT, typename IterT> template<class MeshT, typename PropHandleT, typename PropT, typename IterT>
void initializeProperty(std::ifstream& _iff, MeshT& _mesh, const std::string& _s_tmp, void initializeProperty(std::ifstream& _iff, MeshT& _mesh, const std::string& _s_tmp,
const IterT& _begin, const IterT& _end) const; const IterT& _begin, const IterT& _end) const;
}; };
......
...@@ -9,7 +9,7 @@ Vertices ...@@ -9,7 +9,7 @@ Vertices
1.0 -1.0 1.0 1.0 -1.0 1.0
1.0 1.0 1.0 1.0 1.0 1.0
-1.0 1.0 1.0 -1.0 1.0 1.0
Property "Vertex Weights" Vertex_Property "Vertex Weights"
float float
1.363 1.363
6.334 6.334
...@@ -33,7 +33,7 @@ Edges ...@@ -33,7 +33,7 @@ Edges
1 5 1 5
2 6 2 6
3 7 3 7
Property "Edge Tag" Edge_Property "Edge Tag"
bool bool
1 1
1 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment