diff --git a/src/OpenMesh/Core/Utils/PropertyManager.hh b/src/OpenMesh/Core/Utils/PropertyManager.hh index f822d776..904fb826 100644 --- a/src/OpenMesh/Core/Utils/PropertyManager.hh +++ b/src/OpenMesh/Core/Utils/PropertyManager.hh @@ -43,6 +43,7 @@ #define PROPERTYMANAGER_HH_ #include +#include namespace OpenMesh { @@ -69,12 +70,12 @@ template class PropertyManager { private: /** - * Noncopyable because there aren't not straightforward copy semantics. + * Noncopyable because there aren't no straightforward copy semantics. */ PropertyManager(const PropertyManager&); /** - * Noncopyable because there aren't not straightforward copy semantics. + * Noncopyable because there aren't no straightforward copy semantics. */ const PropertyManager& operator=(const PropertyManager&); @@ -105,6 +106,9 @@ class PropertyManager { } } + PropertyManager() : mesh_(0), retain_(false) { + } + ~PropertyManager() { deleteProperty(); } @@ -120,6 +124,11 @@ class PropertyManager { return mesh.get_property_handle(dummy, propname); } + bool isValid() const { return mesh_ != 0; } + operator bool() const { return isValid(); } + + const PROPTYPE &getRawProperty() const { return prop_; } + #if __cplusplus > 199711L or __GXX_EXPERIMENTAL_CXX0X__ /** * Move constructor. Transfers ownership (delete responsibility).