3rdParty/boost/1.78.0/libs/property_map/doc/LvaluePropertyMap.html
The LvaluePropertyMap provides operator[] and function get() for accessing a reference to a value object. The return type refines that of function get()in ReadablePropertyMap; it can only be a reference (for a mutable LvaluePropertyMap) or a const reference (for a non-mutable LvaluePropertyMap).
ReadablePropertyMap for non-mutable or ReadWritePropertyMap for mutable property map.
| PMap | A type that is a model of LvaluePropertyMap. | | pmap | An object of type PMap. | | key | An object of type boost::property_traits<PMap>::key_type. |
| Reference Type | boost::property_traits<PMap>::reference | The reference type, which must be a reference or const reference to the value type of the property map. | | Property Map Category | boost::property_traits<PMap>::category | The category of the property: a type convertible to boost::lvalue_property_map_tag. |
| Name | Expression | Return Type | Description |
|---|---|---|---|
| Access Property Value | pmap[key] | value_type& for mutable, const value_type& otherwise. | Obtain a reference to the value associated with key. |
template <class PMap, class Key>
struct LvaluePropertyMapConcept
{
typedef typename property_traits<PMap>::category Category;
typedef boost::lvalue_property_map_tag LvalueTag;
typedef const typename property_traits<PMap>::value_type& const_reference;
void constraints() {
function_requires< ReadWritePropertyMapConcept<PMap, Key> >();
function_requires< ConvertibleConcept<Category, LvalueTag> >();
const_reference ref = pmap[k];
}
PMap pmap;
Key k;
};
template <class PMap, class Key>
struct Mutable_LvaluePropertyMapConcept
{
typedef typename property_traits<PMap>::category Category;
typedef boost::lvalue_property_map_tag LvalueTag;
typedef typename property_traits<PMap>::value_type& reference;
void constraints() {
function_requires< ReadWritePropertyMapConcept<PMap, Key> >();
function_requires<ConvertibleConcept<Category, LvalueTag> >();
reference ref = pmap[k];
}
PMap pmap;
Key k;
};
| Copyright © 2000 | Jeremy Siek, Univ.of Notre Dame ([email protected]) |