Commit fc63402d authored by Janis Born's avatar Janis Born

change PropertyManager::operator* to access the property value for mesh properties

parent 56403e3d
...@@ -325,17 +325,35 @@ class PropertyManager { ...@@ -325,17 +325,35 @@ class PropertyManager {
} }
/** /**
* Access the encapsulated property. * Access the value of the encapsulated mesh property.
*
* Example:
* @code
* PolyMesh m;
* auto description = getOrMakeProperty<void, std::string>(m, "description");
* *description = "This is a very nice mesh.";
* @endcode
*
* @note This method is only used for mesh properties.
*/ */
inline PROPTYPE &operator* () { typename PROPTYPE::reference& operator*() {
return prop_; return mesh_->mproperty(prop_)[0];
} }
/** /**
* Access the encapsulated property. * Access the value of the encapsulated mesh property.
*
* Example:
* @code
* PolyMesh m;
* auto description = getProperty<void, std::string>(m, "description");
* std::cout << *description << std::endl;
* @endcode
*
* @note This method is only used for mesh properties.
*/ */
inline const PROPTYPE &operator* () const { typename PROPTYPE::const_reference& operator*() const {
return prop_; return mesh_->mproperty(prop_)[0];
} }
/** /**
......
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