...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
associative_property_map
This property map is an adaptor that converts any type that is a model of both Pair Associative Container and Unique Associative Container such as std::map into a mutable Lvalue Property Map. Note that the adaptor only retains a reference to the container, so the lifetime of the container must encompass the use of the adaptor.
#include#include
boost/property_map/property_map.hpp
Parameter | Description | Default |
---|---|---|
UniquePairAssociativeContainer | Must be a model of both Pair Associative Container and Unique Associative Container . |
In addition to the methods and functions required by Lvalue Property Map, this class has the following members.
property_traitsThis is the same type as UniquePairAssociativeContainer::data_type.::value_type
associative_property_map()Default Constructor.
associative_property_map(UniquePairAssociativeContainer& c)Constructor.
data_type& operator[](const key_type& k) constThe operator bracket for property access. The key_type and data_type types are from the typedefs inside of UniquePairAssociativeContainer.
templateA function for conveniently creating an associative property map.associative_property_map make_assoc_property_map(UniquePairAssociativeContainer& c);
Copyright © 2002 |
Jeremy Siek,
Indiana University (jsiek@osl.iu.edu) Lie-Quan Lee, Indiana University (llee1@osl.iu.edu) Andrew Lumsdaine, Indiana University (lums@osl.iu.edu) |