Writable Property Map
A Writable Property Map provides the put()
function to associate a value with a key.
Refinement of
Copy Constructible
Notation
PMap |
A type that is a model of Writable Property Map. |
pmap |
An object of type PMap. |
key |
An object of type boost::property_traits<PMap>::key_type. |
val |
An object of type boost::property_traits<PMap>::value_type. |
Associated Types
Value Type |
boost::property_traits<PMap>::value_type |
|
Key Type |
boost::property_traits<PMap>::key_type |
|
Property Map Category |
boost::property_traits<PMap>::category |
Must be convertible to boost::writable_property_map_tag.
|
Valid Expressions
Name | Expression | Return Type | Description |
Put Property Value |
put(pmap, key, val) |
void |
Assign val to the property associated with key.
|
Notes
The function put() was originally named
set(), but was changed to avoid name conflicts with the
std::set class.
Concept Checking Class
template <class PMap, class Key>
struct WritablePropertyMapConcept
{
typedef typename property_traits<PMap>::key_type key_type;
typedef typename property_traits<PMap>::category Category;
typedef boost::writable_property_map_tag WritableTag;
void constraints() {
function_requires< ConvertibleConcept<Category, WritableTag> >();
put(pmap, k, val);
}
PMap pmap;
Key k;
typename property_traits<PMap>::value_type val;
};
See Also
Property map concepts - Readable Property Map - Read / Write Property Map - Lvalue Property Map - Mutable Lvalue Property Map