Enabled initialization of invalid PropertyManager.
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@826 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -43,6 +43,7 @@
|
|||||||
#define PROPERTYMANAGER_HH_
|
#define PROPERTYMANAGER_HH_
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
namespace OpenMesh {
|
namespace OpenMesh {
|
||||||
|
|
||||||
@@ -69,12 +70,12 @@ template<typename PROPTYPE, typename MeshT>
|
|||||||
class PropertyManager {
|
class PropertyManager {
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Noncopyable because there aren't not straightforward copy semantics.
|
* Noncopyable because there aren't no straightforward copy semantics.
|
||||||
*/
|
*/
|
||||||
PropertyManager(const PropertyManager&);
|
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&);
|
const PropertyManager& operator=(const PropertyManager&);
|
||||||
|
|
||||||
@@ -105,6 +106,9 @@ class PropertyManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PropertyManager() : mesh_(0), retain_(false) {
|
||||||
|
}
|
||||||
|
|
||||||
~PropertyManager() {
|
~PropertyManager() {
|
||||||
deleteProperty();
|
deleteProperty();
|
||||||
}
|
}
|
||||||
@@ -120,6 +124,11 @@ class PropertyManager {
|
|||||||
return mesh.get_property_handle(dummy, propname);
|
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__
|
#if __cplusplus > 199711L or __GXX_EXPERIMENTAL_CXX0X__
|
||||||
/**
|
/**
|
||||||
* Move constructor. Transfers ownership (delete responsibility).
|
* Move constructor. Transfers ownership (delete responsibility).
|
||||||
|
|||||||
Reference in New Issue
Block a user