Commit f552be05 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Enabled initialization of invalid PropertyManager.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@826 fdac6126-5c0c-442c-9429-916003d36597
parent 1ab842a6
......@@ -43,6 +43,7 @@
#define PROPERTYMANAGER_HH_
#include <sstream>
#include <stdexcept>
namespace OpenMesh {
......@@ -69,12 +70,12 @@ template<typename PROPTYPE, typename MeshT>
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).
......
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