allow PropertyManagers to be used in smart ranges

This commit is contained in:
Max Lyon
2019-09-27 14:45:20 +02:00
parent aa91a88f7b
commit f71696f294
3 changed files with 67 additions and 1 deletions

View File

@@ -380,6 +380,30 @@ class PropertyManager {
return mesh_->property(prop_, handle);
}
/**
* Enables convenient access to the encapsulated property.
*
* For a usage example see this class' documentation.
*
* @param handle A handle of the appropriate handle type. (I.e. \p VertexHandle for \p VPropHandleT, etc.)
*/
template<typename HandleType>
inline typename PROPTYPE::reference operator() (const HandleType &handle) {
return mesh_->property(prop_, handle);
}
/**
* Enables convenient access to the encapsulated property.
*
* For a usage example see this class' documentation.
*
* @param handle A handle of the appropriate handle type. (I.e. \p VertexHandle for \p VPropHandleT, etc.)
*/
template<typename HandleType>
inline typename PROPTYPE::const_reference operator() (const HandleType &handle) const {
return mesh_->property(prop_, handle);
}
/**
* Conveniently set the property for an entire range of values.
*