3 Copyright (c) Jeremy Siek 2000
5 Distributed under the Boost Software License, Version 1.0.
6 (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
10 <Title>WritablePropertyMap
</Title>
11 <BODY BGCOLOR=
"#ffffff" LINK=
"#0000ee" TEXT=
"#000000" VLINK=
"#551a8b"
13 <IMG SRC=
"../../../boost.png"
14 ALT=
"C++ Boost" width=
"277" height=
"86">
19 <H2><A NAME=
"concept:WritablePropertyMap"></A>
23 A Writable Property Map has the capability of setting the value
24 object associated with the given key object via the
<tt>put()
</tt>
27 <h3>Refinement of
</h3>
29 <a href=
"../../utility/CopyConstructible.html">Copy Constructible
</a>
36 <TD><tt>PMap
</tt></TD>
37 <TD>A type that is a model of Writable Property Map.
</TD>
40 <TD><tt>pmap
</tt></TD>
41 <TD>An object of type
<tt>PMap
</tt>.
</td>
45 <TD>An object of type
<tt>boost::property_traits
<PMap
>::key_type
</tt>.
</td>
49 <TD>An object of type
<tt>boost::property_traits
<PMap
>::value_type
</tt>.
</td>
53 <h3>Associated Types
</h3>
59 <td><TT>boost::property_traits
<PMap
>::value_type
</TT></td>
61 The type of the property.
67 <td><TT>boost::property_traits
<PMap
>::key_type
</TT></td>
69 The type of the key object used to look up the property. The property
70 map may be templated on the key type, in which case this typedef
76 <td>Property Map Category
</td>
77 <td><TT>boost::property_traits
<PMap
>::category
</TT></td>
79 The category of the property: a type convertible to
80 <TT>writable_property_map_tag
</TT>.
87 <h3>Valid Expressions
</h3>
91 <th>Name
</th><th>Expression
</th><th>Return Type
</th><th>Description
</th>
95 <td>Put Property Value
<a href=
"#1">[
1]
</a></td>
96 <TD><TT>put(pmap, key, val)
</TT></TD>
97 <TD><TT>void
</TT></TD>
99 Assign
<TT>val
</TT> to the property associated with
<TT>k
</TT>.
108 <a name=
"1">[
1]
</a> The function
<tt>put()
</tt> was originally named
109 <tt>set()
</tt>, but was changed to avoid name conflicts with the
110 <tt>std::set
</tt> class when using a compiler (Microsoft Visual C++)
111 with non-standard name lookup rules. The following example demonstrates
113 <pre>#include
<set
>
120 <h3>Concept Checking Class
</h3>
122 <pre> template
<class PMap, class Key
>
123 struct WritablePropertyMapConcept
125 typedef typename property_traits
<PMap
>::key_type key_type;
126 typedef typename property_traits
<PMap
>::category Category;
127 typedef boost::writable_property_map_tag WritableTag;
129 function_requires
< ConvertibleConcept
<Category, WritableTag
> >();
134 typename property_traits
<PMap
>::value_type val;
139 <a href=
"./property_map.html">Property map concepts
</a>
146 <TD nowrap
>Copyright ©
2000</TD><TD>
147 <a HREF=
"http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek
</a>, Univ.of Notre Dame (
<A HREF=
"mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu
</A>)