shared_array_property_map.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <HTML>
  2. <!--
  3. Copyright (c) Trustees of Indiana University 2009
  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>Shared Array 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:shared-array-property-map"></A>
  16. </h2>
  17. <PRE>
  18. shared_array_property_map&lt;ValueType, OffsetMap&gt;
  19. </PRE>
  20. <P>
  21. This property map is an adaptor that contains a <a
  22. href="../../smart_ptr/shared_array.htm">boost::shared_array</a> and uses that
  23. array to store the property map's data. The resulting property map is a model
  24. of <a href="./LvaluePropertyMap.html">Lvalue Property Map</a>.
  25. The <tt>OffsetMap</tt> type is responsible for converting
  26. key objects to integers that can be used as offsets into the array.
  27. <P>
  28. <H3>Where Defined</H3>
  29. <P>
  30. <a href="../../../boost/property_map/shared_array_property_map.hpp"><TT>boost/property_map/shared_array_property_map.hpp</TT></a>
  31. <p>
  32. <H3>Model Of</H3>
  33. <a href="./LvaluePropertyMap.html">Lvalue Property Map</a>
  34. <P>
  35. <H3>Template Parameters</H3>
  36. <P>
  37. <TABLE border>
  38. <TR>
  39. <th>Parameter</th><th>Description</th><th>Default</th>
  40. </tr>
  41. <TR>
  42. <TD><TT>ValueType</TT></TD>
  43. <TD>The value type of the property map.</TD>
  44. <TD>&nbsp;</TD>
  45. </TR>
  46. <TR>
  47. <TD><TT>OffsetMap</TT></TD> <TD>Must be a model of <a
  48. href="./ReadablePropertyMap.html">Readable Property Map</a>
  49. and the value type must be convertible to <tt>std::size_t</tt>.
  50. </TD> <TD>&nbsp;</TD>
  51. </TR>
  52. </TABLE>
  53. <P>
  54. <H3>Members</H3>
  55. <P>
  56. In addition to the methods and functions required by <a
  57. href="./LvaluePropertyMap.html">Lvalue Property Map</a>, this
  58. class has the following members.
  59. <hr>
  60. <pre>
  61. property_traits&lt;shared_array_property_map&gt;::value_type
  62. </pre>
  63. This is the same type as
  64. <TT>ValueType</TT>.
  65. <hr>
  66. <pre>
  67. shared_array_property_map(size_t n)
  68. </pre>
  69. Constructor. Builds the property map with a size of <tt>n</tt> elements. The
  70. <tt>OffsetMap</tt> is default constructed.
  71. <hr>
  72. <pre>
  73. shared_array_property_map(size_t n, OffsetMap m)
  74. </pre>
  75. Constructor. Builds the property map with a size of <tt>n</tt> elements.
  76. <hr>
  77. <hr>
  78. <h3>Non-Member functions</h3>
  79. <hr>
  80. <pre>
  81. template &lt;class ValueType, class OffsetMap&gt;
  82. shared_array_property_map&lt;ValueType, OffsetMap&gt;
  83. make_shared_array_property_map(size_t n, const ValueType&amp;, OffsetMap omap)
  84. </pre>
  85. A function for conveniently creating a shared array map.
  86. <hr>
  87. <br>
  88. <HR>
  89. <TABLE>
  90. <TR valign=top>
  91. <TD nowrap>Copyright &copy; 2009</TD><TD>
  92. Trustees of Indiana University.
  93. </TD></TR></TABLE>
  94. </BODY>
  95. </HTML>