Commit 40247daf authored by Jan Möbius's avatar Jan Möbius

Merge branch 'MorePropertySupport' into 'master'

More property support

See merge request !33
parents b8c2c797 e50353af
Pipeline #7236 passed with stage
in 3 minutes and 57 seconds
......@@ -55,6 +55,9 @@ template <> const std::string typeName<bool>() { return "bool"; }
template <> const std::string typeName<float>() { return "float"; }
template <> const std::string typeName<double>() { return "double"; }
template <> const std::string typeName<std::string>() { return "string"; }
template <> const std::string typeName<std::map<HalfEdgeHandle, int> >(){ return "map_he_int"; }
template <> const std::string typeName<std::map<HalfEdgeHandle, int> >(){ return "map_heh_int"; }
template <> const std::string typeName<std::vector<double> >(){ return "vector_double"; }
template <> const std::string typeName<std::vector<VertexHandle> >(){ return "vector_vh"; }
template <> const std::string typeName<std::vector<HalfFaceHandle> >(){ return "vector_hfh"; }
template <> const std::string typeName<std::vector<std::vector<HalfFaceHandle> > >(){ return "vector_vector_hfh"; }
} // Namespace OpenVolumeMesh
......@@ -72,7 +72,11 @@ template <> const std::string typeName<bool>();
template <> const std::string typeName<float>();
template <> const std::string typeName<double>();
template <> const std::string typeName<std::string>();
template <> const std::string typeName<std::map<HalfEdgeHandle, int> >();
template <> const std::string typeName<std::map<HalfEdgeHandle, int> >();
template <> const std::string typeName<std::vector<double> >();
template <> const std::string typeName<std::vector<VertexHandle> >();
template <> const std::string typeName<std::vector<HalfFaceHandle> >();
template <> const std::string typeName<std::vector<std::vector<HalfFaceHandle> > >();
/// Property classes for the different entity types
template<class T>
......
......@@ -340,6 +340,10 @@ void FileManager::readProperty(std::istream& _iff, MeshT& _mesh) const {
else if(prop_t == typeName<double>()) generateGenericProperty<double, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<std::string>()) generateGenericProperty<std::string, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<std::map<HalfEdgeHandle, int> >()) generateGenericProperty<std::map<HalfEdgeHandle, int>, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<std::vector<double> >()) generateGenericProperty<std::vector<double> , MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<std::vector<VertexHandle> >()) generateGenericProperty<std::vector<VertexHandle> , MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<std::vector<HalfFaceHandle> >()) generateGenericProperty<std::vector<HalfFaceHandle> , MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<std::vector<std::vector<HalfFaceHandle> > >()) generateGenericProperty<std::vector<std::vector<HalfFaceHandle> > , MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec2f>()) generateGenericProperty<Vec2f, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec2d>()) generateGenericProperty<Vec2d, MeshT>(entity_t, name, _iff, _mesh);
......@@ -352,9 +356,9 @@ void FileManager::readProperty(std::istream& _iff, MeshT& _mesh) const {
else if(prop_t == typeName<Vec3ui>()) generateGenericProperty<Vec3ui, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec4f>()) generateGenericProperty<Vec4f, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec4d>()) generateGenericProperty<Vec4d, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec4i>()) generateGenericProperty<Vec4i, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec4ui>()) generateGenericProperty<Vec4ui, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec4d>()) generateGenericProperty<Vec4d, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec4i>()) generateGenericProperty<Vec4i, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec4ui>()) generateGenericProperty<Vec4ui, MeshT>(entity_t, name, _iff, _mesh);
......
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