ReadWritePropertyMap.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <HTML>
  2. <!--
  3. Copyright (c) Jeremy Siek 2000
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENSE_1_0.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. -->
  8. <Head>
  9. <Title>Read Write Property Map</Title>
  10. <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
  11. ALINK="#ff0000">
  12. <IMG SRC="../../../boost.png"
  13. ALT="C++ Boost" width="277" height="86">
  14. <BR Clear>
  15. <H2>
  16. <A NAME="concept:ReadWritePropertyMap"></A>
  17. <BR>
  18. Read/Write Property Map
  19. </H2>
  20. A Read/Write Property Map can be used to read property values via
  21. the <tt>get()</tt> function and can be used to write property values
  22. via the <tt>put()</tt> function.
  23. <H3>Refinement of</H3>
  24. <a href="./ReadablePropertyMap.html">Readable Property Map</a>
  25. and
  26. <a href="./WritablePropertyMap.html">Writable Property Map</a>
  27. <h3>Notation</h3>
  28. <Table>
  29. <TR>
  30. <TD><tt>PMap</tt></TD>
  31. <TD>A type that is a model of Read/Write Property Map.</TD>
  32. </TR>
  33. </table>
  34. <h2>Associated Types</h2>
  35. <table border>
  36. <tr>
  37. <td>Property Map Category
  38. <td><TT>boost::property_traits&lt;PMap&gt;::category</TT></td>
  39. <td>
  40. The category of the property map must be a type convertible to
  41. <TT>read_write_property_map_tag</TT>.
  42. </td>
  43. </tr>
  44. </table>
  45. <h3>Concept Checking Class</h3>
  46. <pre>
  47. template &lt;class PMap, class Key&gt;
  48. struct ReadWritePropertyMapConcept
  49. {
  50. typedef typename property_traits&lt;PMap&gt;::category Category;
  51. typedef boost::read_write_property_map_tag ReadWriteTag;
  52. void constraints() {
  53. function_requires&lt; ReadablePropertyMapConcept&lt;PMap, Key&gt; &gt;();
  54. function_requires&lt; WritablePropertyMapConcept&lt;PMap, Key&gt; &gt;();
  55. function_requires&lt; ConvertibleConcept&lt;Category, ReadWriteTag&gt; &gt;();
  56. }
  57. };
  58. </pre>
  59. <h3>See Also</h3>
  60. <a href="./property_map.html">Property map concepts</a>
  61. <br>
  62. <HR>
  63. <TABLE>
  64. <TR valign=top>
  65. <TD nowrap>Copyright &copy 2000</TD><TD>
  66. <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>)
  67. </TD></TR></TABLE>
  68. </BODY>
  69. </HTML>