identity_property_map.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <HTML>
  2. <!--
  3. Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000, Alex Hagen-Zanker (2012)
  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>Identity 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> </h2>
  16. <PRE>
  17. boost::typed_identity_property_map&lt;T&gt;
  18. typedef boost::typed_identity_propoperty_map&lt;std::size_t&gt; boost::identity_property_map
  19. </PRE>
  20. <p>The <code>typed_identity_property_map</code> property map applies the identity function, that is, it just returns a copy of the key object that was input. The key and value types are both the same as the template parameter <code>T</code>. The <code>identity_property_map</code> name is for the common case where the key and value type are <code>std::size_t</code> (this name is deprecated for use within Boost.Graph). </p>
  21. <p><em>Note:</em> Previously the function <code>get()</code> and <code>operator[]</code> for <code>identity_property_map</code> were overloaded to return a copy of keys of any type, i.e., not just <code>size_t</code>. These overloads are now deprecated, because they did not adhere to the property map concepts.</p>
  22. <H3>Where Defined</H3>
  23. <P>
  24. <a href="../../../boost/property_map/property_map.hpp"><TT>boost/property_map/property_map.hpp</TT></a>
  25. </P>
  26. <h3>Model of</h3>
  27. <a href="./ReadablePropertyMap.html">Readable Property Map</a>
  28. <h3>Template Parameters</h3>
  29. <TABLE border>
  30. <TR>
  31. <th>Parameter</th>
  32. <th>Description</th>
  33. <th>Default</th>
  34. </tr>
  35. <TR>
  36. <TD><TT>T</TT></TD>
  37. <TD>Must be Copy Contructible</TD>
  38. <TD>&nbsp;</td>
  39. </tr>
  40. </TABLE>
  41. <h3>Associated Types</h3>
  42. <table border>
  43. <tr>
  44. <th>Type</th><th>Description</th>
  45. </tr>
  46. <tr>
  47. <td><tt>
  48. boost::property_traits&lt;typed_identity_property_map&lt;T&gt; &gt;::value_type
  49. </tt></td>
  50. <td>
  51. This type is <tt>T</tt>. </td>
  52. </tr>
  53. <tr>
  54. <td><tt>
  55. boost::property_traits&lt;typed_identity_property_map&lt;T&gt; &gt;::key_type
  56. </tt></td>
  57. <td>
  58. This type is <tt>T</tt>.</td>
  59. </tr>
  60. <tr>
  61. <td><tt>
  62. boost::property_traits&lt;typed_identity_property_map&lt;T&gt; &gt;::reference
  63. </tt></td>
  64. <td>
  65. This type is <tt>T</tt>..</td>
  66. </tr>
  67. <tr>
  68. <td><tt>
  69. boost::property_traits&lt;typed_identity_property_map&lt;T&gt; &gt;::category
  70. </tt></td>
  71. <td>
  72. This type is <tt>boost::readable_property_map_tag</tt>.
  73. </td>
  74. </tr>
  75. </table>
  76. <h3>Member Functions</h3>
  77. <table border>
  78. <tr>
  79. <th>Member</th><th>Description</th>
  80. </tr>
  81. <tr>
  82. <td><tt>
  83. typed_identity_property_map()
  84. </tt></td>
  85. <td>
  86. Default constructor.
  87. </td>
  88. </tr>
  89. <tr>
  90. <td><tt>
  91. typed_identity_property_map(const typed_identity_property_map&lt;T&gt;&amp; x)
  92. </tt></td>
  93. <td>
  94. Copy constructor.
  95. </td>
  96. </tr>
  97. <tr>
  98. <td><tt>
  99. T operator[](const T&amp; x) const
  100. </tt></td>
  101. <td>
  102. Returns a copy of object <tt>x</tt>.
  103. </td>
  104. </tr>
  105. </table>
  106. <h3>Non-Member Functions</h3>
  107. <table border>
  108. <tr>
  109. <th>Member</th><th>Description</th>
  110. </tr>
  111. <tr>
  112. <td><tt> T get(const typed_identity_property_map&lt;T&gt;&amp; pmap, const T&amp; x)
  113. </tt></td>
  114. <td>
  115. Returns a copy of object <tt>x</tt>.
  116. </td>
  117. </tr>
  118. </table>
  119. <br>
  120. <HR>
  121. <TABLE>
  122. <TR valign=top>
  123. <TD nowrap>Copyright &copy; 2000-2012</TD><TD>
  124. <a HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</a>,
  125. Univ.of Notre Dame (<A
  126. HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
  127. <A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Univ. of Notre Dame (<A HREF="mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</A>)<br>
  128. <A HREF="http://www.lsc.nd.edu/~lums">Andrew Lumsdaine</A>,
  129. Univ.of Notre Dame (<A
  130. HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)<br>
  131. Alex Hagen-Zanker</TD></TR></TABLE>
  132. </BODY>
  133. </HTML>