123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <HTML>
- <!--
- Copyright 2006, 2013 The Trustees of Indiana University
-
- Use, modification and distribution is subject to the Boost Software
- License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-
- -->
- <Head>
- <Title>Static Property Map</Title>
- <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
- ALINK="#ff0000">
- <IMG SRC="../../../boost.png"
- ALT="C++ Boost" width="277" height="86">
- <BR Clear>
- <H2><A NAME="sec:static-property-map"></A>
- </h2>
- <PRE>
- template <typename ValueType, typename KeyType = void>
- class static_property_map
- </PRE>
- This property map wraps a copy of some particular object, and
- returns a copy of that object whenever a key object is input.
- <H3>Where Defined</H3>
- <P>
- <a href="../../../boost/property_map/property_map.hpp"><TT>boost/property_map/property_map.hpp</TT></a>
- <h3>Model of</h3>
- <a href="./ReadablePropertyMap.html">Readable Property Map</a>
- <h3>Associated Types</h3>
- <table border>
- <tr>
- <th>Type</th><th>Description</th>
- </tr>
- <tr>
- <td><tt>
- boost::property_traits<static_property_map>::value_type
- </tt></td>
- <td>
- This type is the <tt>ValueType</tt> with which the template was instantiated.
- </td>
- </tr>
- <tr>
- <td><tt>
- boost::property_traits<static_property_map>::key_type
- </tt></td>
- <td>
- This type is the <tt>KeyType</tt> with which the template was instantiated.
- </td>
- </tr>
- <tr>
- <td><tt>
- boost::property_traits<static_property_map>::category
- </tt></td>
- <td>
- This type is <tt>boost::readable_property_map_tag</tt>.
- </td>
- </tr>
- </table>
- <h3>Member Functions</h3>
- <table border>
- <tr>
- <th>Member</th><th>Description</th>
- </tr>
- <tr>
- <td><tt>
- static_property_map(ValueType v)
- </tt></td>
- <td>
- The constructor for static_property_map is provided the value that
- the property map will return when queried.
- </td>
- </tr>
- <tr>
- <td><tt>
- static_property_map(const static_property_map& x)
- </tt></td>
- <td>
- Copy constructor.
- </td>
- </tr>
- <tr>
- <td><pre>
- template <typename T>
- ValueType& operator[](T) const
- </pre></td>
- <td>
- Returns the contained value by copy.
- </td>
- </tr>
- </table>
- <h3>Non-Member Functions</h3>
- <table border>
- <tr><td><pre>
- template <typename KeyType, typename ValueType>
- static_property_map<KeyType, ValueType>
- make_static_property_map(const ValueType& value);
- </pre></td>
- <td>Returns a <tt>static_property_map</tt> with the given key type initialized to the given value.</td>
- </tr>
- </table>
- </BODY>
- </HTML>
|