|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78021 - trunk/libs/property_map/doc
From: jewillco_at_[hidden]
Date: 2012-04-16 13:40:45
Author: jewillco
Date: 2012-04-16 13:40:44 EDT (Mon, 16 Apr 2012)
New Revision: 78021
URL: http://svn.boost.org/trac/boost/changeset/78021
Log:
Added (edited) new version of identity_property_map documentation from Alex Hagen-Zanker; fixes #6550
Text files modified:
trunk/libs/property_map/doc/identity_property_map.html | 75 +++++++++++++++++++++++++--------------
1 files changed, 47 insertions(+), 28 deletions(-)
Modified: trunk/libs/property_map/doc/identity_property_map.html
==============================================================================
--- trunk/libs/property_map/doc/identity_property_map.html (original)
+++ trunk/libs/property_map/doc/identity_property_map.html 2012-04-16 13:40:44 EDT (Mon, 16 Apr 2012)
@@ -1,6 +1,6 @@
<HTML>
<!--
- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
+ Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000, Alex Hagen-Zanker (2012)
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
@@ -9,30 +9,46 @@
<Head>
<Title>Identity Property Map</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
- ALINK="#ff0000">
+ ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
-<H2><A NAME="sec:identity-property-map"></A>
-</h2>
+<H2><A NAME="sec:identity-property-map"></A> </h2>
+
<PRE>
-identity_property_map
+boost::typed_identity_property_map<T>
+
+typedef boost::typed_identity_propoperty_map<std::size_t> boost::identity_property_map
</PRE>
-This property map applies the identity function, that is, it just
-returns a copy of the key object that was input.
+<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>
+<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>
<H3>Where Defined</H3>
<P>
-boost/property_map/property_map.hpp
-
+ boost/property_map/property_map.hpp
+</P>
+
<h3>Model of</h3>
<a href="./ReadablePropertyMap.html">Readable Property Map</a>
+<h3>Template Parameters</h3>
+<TABLE border>
+ <TR>
+ <th>Parameter</th>
+ <th>Description</th>
+ <th>Default</th>
+ </tr>
+ <TR>
+ <TD><TT>T</TT></TD>
+ <TD>Must be Copy Contructible</TD>
+ <TD> </td>
+ </tr>
+</TABLE>
<h3>Associated Types</h3>
<table border>
@@ -42,28 +58,34 @@
<tr>
<td><tt>
-boost::property_traits<identity_property_map>::value_type
+boost::property_traits<typed_identity_property_map<T> >::value_type
</tt></td>
<td>
-This type is <tt>std::size_t</tt>; the map functions are templated.
-</td>
+This type is <tt>T</tt>. </td>
</tr>
<tr>
<td><tt>
-boost::property_traits<identity_property_map>::key_type
+boost::property_traits<typed_identity_property_map<T> >::key_type
</tt></td>
<td>
-This type is <tt>std::size_t</tt>; the map functions are templated.
-</td>
+This type is <tt>T</tt>.</td>
+</tr>
+
+<tr>
+<td><tt>
+boost::property_traits<typed_identity_property_map<T> >::reference
+</tt></td>
+<td>
+This type is <tt>T</tt>..</td>
</tr>
<tr>
<td><tt>
-boost::property_traits<identity_property_map>::category
+boost::property_traits<typed_identity_property_map<T> >::category
</tt></td>
<td>
-This type is <tt>boost::readable_op_bracket_tag</tt>.
+This type is <tt>boost::readable_property_map_tag</tt>.
</td>
</tr>
@@ -79,7 +101,7 @@
<tr>
<td><tt>
-identity_property_map()
+typed_identity_property_map()
</tt></td>
<td>
Default constructor.
@@ -88,7 +110,7 @@
<tr>
<td><tt>
-identity_property_map(const identity_property_map& x)
+typed_identity_property_map(const typed_identity_property_map<T>& x)
</tt></td>
<td>
Copy constructor.
@@ -97,8 +119,7 @@
<tr>
<td><tt>
-template <class T><br>
-T operator[](T x) const
+ T operator[](const T& x) const
</tt></td>
<td>
Returns a copy of object <tt>x</tt>.
@@ -115,9 +136,7 @@
</tr>
<tr>
-<td><tt>
-template <class T><br>
-T get(const identity_property_map& pmap, T x)
+<td><tt> T get(const typed_identity_property_map<T>& pmap, const T& x)
</tt></td>
<td>
Returns a copy of object <tt>x</tt>.
@@ -131,15 +150,15 @@
<HR>
<TABLE>
<TR valign=top>
-<TD nowrap>Copyright © 2000</TD><TD>
+<TD nowrap>Copyright © 2000-2012</TD><TD>
<a HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</a>,
Univ.of Notre Dame (<A
HREF="mailto:jsiek_at_[hidden]">jsiek_at_[hidden]</A>)<br>
-<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Univ.of Notre Dame (<A HREF="mailto:llee1_at_[hidden]">llee1_at_[hidden]</A>)<br>
+<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Univ. of Notre Dame (<A HREF="mailto:llee1_at_[hidden]">llee1_at_[hidden]</A>)<br>
<A HREF="http://www.lsc.nd.edu/~lums">Andrew Lumsdaine</A>,
Univ.of Notre Dame (<A
-HREF="mailto:lums_at_[hidden]">lums_at_[hidden]</A>)
-</TD></TR></TABLE>
+HREF="mailto:lums_at_[hidden]">lums_at_[hidden]</A>)<br>
+Alex Hagen-Zanker</TD></TR></TABLE>
</BODY>
</HTML>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk