PropertyManager: Added duplicate method.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@996 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Hans-Christian Ebke
2014-02-13 09:25:46 +00:00
parent cecb706e70
commit 61c893321e

View File

@@ -177,6 +177,13 @@ class PropertyManager {
return std::move(pm); return std::move(pm);
} }
PropertyManager duplicate(const char *clone_name) {
PropertyManager pm(*mesh_, clone_name, false);
pm.mesh_->property(pm.prop_) = mesh_->property(prop_);
return std::move(pm);
}
#else #else
class Proxy { class Proxy {
private: private:
@@ -215,6 +222,12 @@ class PropertyManager {
pm.retain(); pm.retain();
return (Proxy)pm; return (Proxy)pm;
} }
Proxy duplicate(const char *clone_name) {
PropertyManager pm(*mesh_, clone_name, false);
pm.mesh_->property(pm.prop_) = mesh_->property(prop_);
return (Proxy)pm;
}
#endif #endif
/** /**