diff --git a/src/OpenMesh/Core/Utils/BaseProperty.hh b/src/OpenMesh/Core/Utils/BaseProperty.hh index 1e63d6d3..e4d552f1 100644 --- a/src/OpenMesh/Core/Utils/BaseProperty.hh +++ b/src/OpenMesh/Core/Utils/BaseProperty.hh @@ -133,6 +133,9 @@ public: // I/O support /// persistency. virtual void set_persistent( bool _yn ) = 0; + ///returns a unique string for the type of the elements + virtual std::string get_storage_name() const = 0; + /// Number of elements in property virtual size_t n_elements() const = 0; diff --git a/src/OpenMesh/Core/Utils/Property.hh b/src/OpenMesh/Core/Utils/Property.hh index 71e2f86f..dad06f61 100644 --- a/src/OpenMesh/Core/Utils/Property.hh +++ b/src/OpenMesh/Core/Utils/Property.hh @@ -54,6 +54,7 @@ #include #include #include +#include //== NAMESPACES =============================================================== @@ -207,6 +208,10 @@ public: // data access interface return p; } + std::string get_storage_name() const override + { + return get_string_for_type(T()); + } private: @@ -371,6 +376,11 @@ public: return p; } + std::string get_storage_name() const override + { + return get_string_for_type(bool()); + } + private: @@ -457,6 +467,11 @@ public: PropertyT* p = new PropertyT( *this ); return p; } + + std::string get_storage_name() const override + { + return get_string_for_type(std::string()); + } private: vector_type data_;