1 | <HTML>
|
---|
2 | <!--
|
---|
3 | Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000, Alex Hagen-Zanker (2012)
|
---|
4 |
|
---|
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)
|
---|
8 | -->
|
---|
9 | <Head>
|
---|
10 | <Title>Identity Property Map</Title>
|
---|
11 | <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
---|
12 | ALINK="#ff0000">
|
---|
13 | <IMG SRC="../../../boost.png"
|
---|
14 | ALT="C++ Boost" width="277" height="86">
|
---|
15 |
|
---|
16 | <BR Clear>
|
---|
17 |
|
---|
18 | <H2><A NAME="sec:identity-property-map"></A> </h2>
|
---|
19 |
|
---|
20 | <PRE>
|
---|
21 | typed_identity_property_map< T >
|
---|
22 |
|
---|
23 | typedef typed_identity_propoperty_map<size_t> identity_property_map
|
---|
24 | </PRE>
|
---|
25 |
|
---|
26 | <p>The <code>typed_identity_property_map</code> applies the identity function, that is, it just returns a copy of the key object that was input. The type key and value objects have the same type which is set by the template parameter <code>T</code>. The <code>identity_property_map</code> is for the common case where the key and value type is <code> size_t</code>. </p>
|
---|
27 | <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>
|
---|
28 |
|
---|
29 | <H3>Where Defined</H3>
|
---|
30 |
|
---|
31 | <P>
|
---|
32 | <a href="../../../boost/property_map/property_map.hpp"><TT>boost/property_map/property_map.hpp</TT></a>
|
---|
33 | </P>
|
---|
34 |
|
---|
35 | <h3>Model of</h3>
|
---|
36 |
|
---|
37 | <a href="./ReadablePropertyMap.html">Readable Property Map</a>
|
---|
38 |
|
---|
39 | <h3>Template Parameters</h3>
|
---|
40 | <TABLE border>
|
---|
41 | <TR>
|
---|
42 | <th>Parameter</th>
|
---|
43 | <th>Description</th>
|
---|
44 | <th>Default</th>
|
---|
45 | </tr>
|
---|
46 | <TR>
|
---|
47 | <TD><TT>T</TT></TD>
|
---|
48 | <TD>Must be Copy Contructible</TD>
|
---|
49 | <TD> </td>
|
---|
50 | </tr>
|
---|
51 | </TABLE>
|
---|
52 | <h3>Associated Types</h3>
|
---|
53 |
|
---|
54 | <table border>
|
---|
55 | <tr>
|
---|
56 | <th>Type</th><th>Description</th>
|
---|
57 | </tr>
|
---|
58 |
|
---|
59 | <tr>
|
---|
60 | <td><tt>
|
---|
61 | boost::property_traits<typed_identity_property_map<T> >::value_type
|
---|
62 | </tt></td>
|
---|
63 | <td>
|
---|
64 | This type is <tt>T</tt>. </td>
|
---|
65 | </tr>
|
---|
66 |
|
---|
67 | <tr>
|
---|
68 | <td><tt>
|
---|
69 | boost::property_traits<typed_identity_property_map<T> >::key_type
|
---|
70 | </tt></td>
|
---|
71 | <td>
|
---|
72 | This type is <tt>T</tt>.</td>
|
---|
73 | </tr>
|
---|
74 |
|
---|
75 | <tr>
|
---|
76 | <td><tt>
|
---|
77 | boost::property_traits<typed_identity_property_map<T> >::reference
|
---|
78 | </tt></td>
|
---|
79 | <td>
|
---|
80 | This type is <tt>T</tt>..</td>
|
---|
81 | </tr>
|
---|
82 |
|
---|
83 | <tr>
|
---|
84 | <td><tt>
|
---|
85 | boost::property_traits<typed_identity_property_map<T> >::category
|
---|
86 | </tt></td>
|
---|
87 | <td>
|
---|
88 | This type is <tt>boost::readable_property_map_tag</tt>.
|
---|
89 | </td>
|
---|
90 | </tr>
|
---|
91 |
|
---|
92 | </table>
|
---|
93 |
|
---|
94 | <h3>Member Functions</h3>
|
---|
95 |
|
---|
96 | <table border>
|
---|
97 | <tr>
|
---|
98 | <th>Member</th><th>Description</th>
|
---|
99 | </tr>
|
---|
100 |
|
---|
101 |
|
---|
102 | <tr>
|
---|
103 | <td><tt>
|
---|
104 | typed_identity_property_map()
|
---|
105 | </tt></td>
|
---|
106 | <td>
|
---|
107 | Default constructor.
|
---|
108 | </td>
|
---|
109 | </tr>
|
---|
110 |
|
---|
111 | <tr>
|
---|
112 | <td><tt>
|
---|
113 | typed_identity_property_map(const typed_identity_property_map<T>& x)
|
---|
114 | </tt></td>
|
---|
115 | <td>
|
---|
116 | Copy constructor.
|
---|
117 | </td>
|
---|
118 | </tr>
|
---|
119 |
|
---|
120 | <tr>
|
---|
121 | <td><tt>
|
---|
122 | T operator[](const T& x) const
|
---|
123 | </tt></td>
|
---|
124 | <td>
|
---|
125 | Returns a copy of object <tt>x</tt>.
|
---|
126 | </td>
|
---|
127 | </tr>
|
---|
128 |
|
---|
129 | </table>
|
---|
130 |
|
---|
131 | <h3>Non-Member Functions</h3>
|
---|
132 |
|
---|
133 | <table border>
|
---|
134 | <tr>
|
---|
135 | <th>Member</th><th>Description</th>
|
---|
136 | </tr>
|
---|
137 |
|
---|
138 | <tr>
|
---|
139 | <td><tt> T get(const typed_identity_property_map<T>& pmap, const T& x)
|
---|
140 | </tt></td>
|
---|
141 | <td>
|
---|
142 | Returns a copy of object <tt>x</tt>.
|
---|
143 | </td>
|
---|
144 | </tr>
|
---|
145 |
|
---|
146 | </table>
|
---|
147 |
|
---|
148 |
|
---|
149 | <br>
|
---|
150 | <HR>
|
---|
151 | <TABLE>
|
---|
152 | <TR valign=top>
|
---|
153 | <TD nowrap>Copyright © 2000-2012</TD><TD>
|
---|
154 | <a HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</a>,
|
---|
155 | Univ.of Notre Dame (<A
|
---|
156 | HREF="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</A>)<br>
|
---|
157 | <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>
|
---|
158 | <A HREF="http://www.lsc.nd.edu/~lums">Andrew Lumsdaine</A>,
|
---|
159 | Univ.of Notre Dame (<A
|
---|
160 | HREF="mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</A>)<br>
|
---|
161 | Alex Hagen-Zanker</TD></TR></TABLE>
|
---|
162 |
|
---|
163 | </BODY>
|
---|
164 | </HTML>
|
---|