ref_property_map.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <HTML>
  2. <!--
  3. Copyright 2006 The Trustees of Indiana University
  4. Use, modification and distribution is subject to the Boost Software
  5. License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. -->
  8. <Head>
  9. <Title>Reference 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><A NAME="sec:identity-property-map"></A>
  16. </h2>
  17. <PRE>
  18. template &lt;typename KeyType, typename ValueType&gt;
  19. class ref_property_map
  20. </PRE>
  21. This property map wraps a reference to some particular object, and
  22. returns that reference whenever a key object is input.
  23. <H3>Where Defined</H3>
  24. <P>
  25. <a href="../../../boost/property_map/property_map.hpp"><TT>boost/property_map/property_map.hpp</TT></a>
  26. <h3>Model of</h3>
  27. <a href="./LvaluePropertyMap.html">Lvalue Property Map</a>
  28. <h3>Associated Types</h3>
  29. <table border>
  30. <tr>
  31. <th>Type</th><th>Description</th>
  32. </tr>
  33. <tr>
  34. <td><tt>
  35. boost::property_traits&lt;ref_property_map&gt;::value_type
  36. </tt></td>
  37. <td>
  38. This type is the <tt>ValueType</tt> with which the template was instantiated.
  39. </td>
  40. </tr>
  41. <tr>
  42. <td><tt>
  43. boost::property_traits&lt;ref_property_map&gt;::key_type
  44. </tt></td>
  45. <td>
  46. This type is the <tt>KeyType</tt> with which the template was instantiated.
  47. </td>
  48. </tr>
  49. <tr>
  50. <td><tt>
  51. boost::property_traits&lt;ref_property_map&gt;::category
  52. </tt></td>
  53. <td>
  54. This type is <tt>boost::lvalue_property_map_tag</tt>.
  55. </td>
  56. </tr>
  57. </table>
  58. <h3>Member Functions</h3>
  59. <table border>
  60. <tr>
  61. <th>Member</th><th>Description</th>
  62. </tr>
  63. <tr>
  64. <td><tt>
  65. ref_property_map(ValueType&amp; v)
  66. </tt></td>
  67. <td>
  68. The constructor for ref_property_map is provided the reference that
  69. the property map will return when queried.
  70. </td>
  71. </tr>
  72. <tr>
  73. <td><tt>
  74. ref_property_map(const ref_property_map&amp; x)
  75. </tt></td>
  76. <td>
  77. Copy constructor.
  78. </td>
  79. </tr>
  80. <tr>
  81. <td><tt>
  82. ValueType&amp; operator[](KeyType const&amp;) const
  83. </tt></td>
  84. <td>
  85. Returns the contained reference.
  86. </td>
  87. </tr>
  88. </table>
  89. </BODY>
  90. </HTML>