diff --git a/src/OpenMesh/Core/IO/OMFormat.hh b/src/OpenMesh/Core/IO/OMFormat.hh index 5c8164c8..234e0844 100644 --- a/src/OpenMesh/Core/IO/OMFormat.hh +++ b/src/OpenMesh/Core/IO/OMFormat.hh @@ -54,6 +54,7 @@ #include #include #include +#include // -------------------- #include #if defined(OM_CC_GCC) && (OM_GCC_VERSION < 30000) @@ -275,27 +276,32 @@ namespace OMFormat { }; - //----------------------------------------------------------------------------------------------------------------------------------- - //this enum stores the type of the property so that it can be recovered - enum PropertyType { - UnknownType = 0x00, - BoolType = 0x01, - UCharType= 0x02, - CharType = 0x03, - ShortType = 0x04, - UIntType = 0x05, - IntType = 0x06, - ULongType = 0x07, - LongType = 0x08, - FloatType = 0x09, - DoubleType = 0x0a, - VecDoubleType = 0x0b - }; -//----------------------------------------------------------------------------------------------------------------------------------- - }; // Chunk // ------------------------------------------------------------ Helper + //----------------------get string for type recognition + + template std::string get_type_string(){ return "unknown";} + + template <> inline std::string get_type_string(){ return "facehandle";} + template <> inline std::string get_type_string(){ return "edgehandle";} + template <> inline std::string get_type_string(){ return "halfedgehandle";} + template <> inline std::string get_type_string(){ return "vertexhandle";} + + template <> inline std::string get_type_string(){ return "bool";} + template <> inline std::string get_type_string(){ return "char";} + template <> inline std::string get_type_string(){ return "double";} + template <> inline std::string get_type_string(){ return "float";} + template <> inline std::string get_type_string(){ return "int";} + template <> inline std::string get_type_string(){ return "uchar";} + template <> inline std::string get_type_string(){ return "uint";} + template <> inline std::string get_type_string(){ return "ushort";} + + template std::string get_type_string(std::vector) + { return "std::vector of " + get_type_string(T());} + + template std::string get_type_string(OpenMesh::VectorT) + { return "OM vector of dimension " + std::to_string(Dim) + " of type " + get_type_string(T()); } // -------------------- get size information