Update of /cvsroot/boost/boost/libs/property_map/doc
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18356
Modified Files:
dynamic_property_map.html
Log Message:
Added documentation for "ignore_other_properties".
Index: dynamic_property_map.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/property_map/doc/dynamic_property_map.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- dynamic_property_map.html 2 May 2007 20:49:24 -0000 1.3
+++ dynamic_property_map.html 20 Jun 2007 16:37:21 -0000 1.4
@@ -3,23 +3,23 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.5:
http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.3.8:
http://docutils.sourceforge.net/" />
<title>Boost Dynamic Property Maps</title>
<link rel="stylesheet" href="../../../boost.css" type="text/css" />
</head>
<body>
<div class="document" id="logo-dynamic-property-maps">
-<h1 class="title"><a class="reference" href="../../../index.htm"><img
align="middle" alt="Boost" class="align-middle" src="../../../boost.png" /></a>
Dynamic Property Maps</h1>
-<div class="section">
-<h1><a class="toc-backref" href="#id2" id="summary"
name="summary">Summary</a></h1>
+<h1 class="title"><a class="reference" href="../../../index.htm"><img
align="middle" alt="Boost" src="../../../boost.png" /></a> Dynamic Property
Maps</h1>
+<div class="section" id="summary">
+<h1><a class="toc-backref" href="#id2" name="summary">Summary</a></h1>
<p>The dynamic property map interfaces provides access to a collection of
property maps through a dynamically-typed interface. An algorithm can
use it to manipulate property maps without knowing their key or
value types at compile-time. Type-safe codes can use dynamic property
maps to interface more easily and completely with scripting languages
and other text-based representations of key-value data.</p>
-<div class="contents topic">
-<p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
+<div class="contents topic" id="contents">
+<p class="topic-title first"><a name="contents">Contents</a></p>
<ul class="simple">
<li><a class="reference" href="#summary" id="id2" name="id2">Summary</a></li>
<li><a class="reference" href="#introduction" id="id3"
name="id3">Introduction</a><ul>
@@ -35,10 +35,10 @@
</ul>
</div>
</div>
-<div class="section">
-<h1><a class="toc-backref" href="#id3" id="introduction"
name="introduction">Introduction</a></h1>
+<div class="section" id="introduction">
+<h1><a class="toc-backref" href="#id3"
name="introduction">Introduction</a></h1>
<p>The Boost Property Map library specifies statically type-safe
-interfaces through which key-value pairs can be manipulated by
+interfaces through which key-value pairs can be manipulated by
generic algorithms. Typically, an algorithm that uses property maps is
parameterized on the types of the property maps it uses, and it
manipulates them using the interfaces specified by the
@@ -46,7 +46,7 @@
<p>The following generic function illustrates property map basics.</p>
<pre class="literal-block">
template <typename AgeMap, typename GPAMap>
-void
+void
manipulate_freds_info(AgeMap ages, GPAMap gpas) {
typedef typename boost::property_traits<AgeMap>::key_type name_type;
@@ -107,8 +107,8 @@
Internally, the dynamic property map converts key and value pairs to
meet the requirements of the underlying property map or signals a
runtime exception if it cannot.</p>
-<div class="section">
-<h2><a class="toc-backref" href="#id4" id="fred-s-info-revisited"
name="fred-s-info-revisited">"Fred's Info" Revisited</a></h2>
+<div class="section" id="fred-s-info-revisited">
+<h2><a class="toc-backref" href="#id4"
name="fred-s-info-revisited">"Fred's Info" Revisited</a></h2>
<p>Here's what the example above looks like using the
<tt class="docutils literal"><span class="pre">dynamic_properties</span></tt>
interface:</p>
<pre class="literal-block">
@@ -166,7 +166,7 @@
manipulate_freds_info(properties);
std::cout << "Fred's age: " << get(age_map,fred)
<< "\n"
- << "Fred's gpa: " << get(gpa_map,fred)
<< "\n";
+ << "Fred's gpa: " << get(gpa_map,fred)
<< "\n";
}
</pre>
<p>The code first creates two property maps using <tt class="docutils
literal"><span class="pre">std::map</span></tt> and the
@@ -181,8 +181,8 @@
typing of property map uses elsewhere in an application.</p>
</div>
</div>
-<div class="section">
-<h1><a class="toc-backref" href="#id5" id="reference"
name="reference">Reference</a></h1>
+<div class="section" id="reference">
+<h1><a class="toc-backref" href="#id5" name="reference">Reference</a></h1>
<pre class="literal-block">
class dynamic_properties
</pre>
@@ -190,8 +190,8 @@
a set of property maps. To use it, one must populate
an object of this class with property maps using the <tt class="docutils
literal"><span class="pre">property</span></tt> member
function.</p>
-<div class="section">
-<h2><a class="toc-backref" href="#id6" id="member-functions"
name="member-functions">Member Functions</a></h2>
+<div class="section" id="member-functions">
+<h2><a class="toc-backref" href="#id6" name="member-functions">Member
Functions</a></h2>
<pre class="literal-block">
dynamic_properties()
dynamic_properties(
@@ -201,15 +201,17 @@
>& fn)
</pre>
<p>A <tt class="docutils literal"><span
class="pre">dynamic_properties</span></tt> object can be constructed with a
function object
-that, when called, creates a new property map. If an attempt is made
+that, when called, creates a new property map. The library provides the
+<tt class="docutils literal"><span
class="pre">ignore_other_properties</span></tt> function object, which lets the
<tt class="docutils literal"><span class="pre">dynamic_properties</span></tt>
object ignore any properties that it hasn't been prepared to record.
+If an attempt is made
to <tt class="docutils literal"><span class="pre">put</span></tt> a key-value
pair to a nonexistent <tt class="docutils literal"><span
class="pre">dynamic_properties</span></tt> key,
then this function is called with the <tt class="docutils literal"><span
class="pre">dynamic_properties</span></tt> key and the
intended property key and value . If <tt class="docutils literal"><span
class="pre">dynamic_properties</span></tt> is
-default-constructed, such a <tt class="docutils literal"><span
class="pre">put</span></tt> attempt throws
+default-constructed, such a <tt class="docutils literal"><span
class="pre">put</span></tt> attempt throws
<tt class="docutils literal"><span
class="pre">property_not_found</span></tt>.</p>
<pre class="literal-block">
template<typename PropertyMap>
-dynamic_properties&
+dynamic_properties&
property(const std::string& name, PropertyMap property_map)
</pre>
<p>This member function adds a property map to the set of maps contained,
@@ -235,20 +237,29 @@
dynamic property maps held by the <tt class="docutils literal"><span
class="pre">dynamic_properties</span></tt> object. It is used to
terminate traversals over the set of dynamic property maps</p>
<pre class="literal-block">
-iterator lower_bound(const std::string& name)
+iterator lower_bound(const std::string& name)
</pre>
<p>This member function returns an iterator that points to the first
-property map whose <tt class="docutils literal"><span
class="pre">dynamic_properties</span></tt> key is <tt class="docutils
literal"><span class="pre">name</span></tt>.
+property map whose <tt class="docutils literal"><span
class="pre">dynamic_properties</span></tt> key is <tt class="docutils
literal"><span class="pre">name</span></tt>.
Bear in mind that multiple property maps may have the same
<tt class="docutils literal"><span class="pre">dynamic_properties</span></tt>
key, so long as their property map key types differ.</p>
<p>Invariant: The range [ lower_bound(name), end() ) contains every
property map that has name for its <tt class="docutils literal"><span
class="pre">dynamic_properties</span></tt> key.</p>
</div>
-<div class="section">
-<h2><a class="toc-backref" href="#id7" id="free-functions"
name="free-functions">Free functions</a></h2>
+<div class="section" id="free-functions">
+<h2><a class="toc-backref" href="#id7" name="free-functions">Free
functions</a></h2>
+<pre class="literal-block">
+std::auto_ptr<boost::dynamic_property_map>
+ignore_other_properties(const std::string&,
+ const boost::any&,
+ const boost::any&)
+</pre>
+<p>When passed to the <tt class="docutils literal"><span
class="pre">dynamic_properties</span></tt> constructor, this function
+allows the <tt class="docutils literal"><span
class="pre">dynamic_properties</span></tt> object to disregard attempts to put
+values to unknown keys without signaling an error.</p>
<pre class="literal-block">
template<typename Key, typename Value>
-bool put(const std::string& name, dynamic_properties& dp, const
Key& key,
+bool put(const std::string& name, dynamic_properties& dp, const
Key& key,
const Value& value)
</pre>
<p>This function adds a key-value pair to the property map with the
@@ -265,7 +276,7 @@
thrown.</p>
<pre class="literal-block">
template<typename Value, typename Key>
-Value get(const std::string& name, const dynamic_properties& dp,
+Value get(const std::string& name, const dynamic_properties& dp,
const Key& key)
</pre>
<p>This function gets the value from the property-map whose namee is
@@ -290,7 +301,7 @@
2) For this expression to be valid, the key must be
associated with some value, otherwise the result is undefined.</p>
<pre class="literal-block">
-std::string get_string(const any& key)
+std::string get_string(const any& key)
</pre>
<p>Given a representation of a key, return the string representation
of the value associated with that key.</p>
@@ -301,7 +312,7 @@
associated with some value, otherwise the result is undefined.
3) The value type of the property map must model Output Streamable.</p>
<pre class="literal-block">
-void put(const any& key, const any& value)
+void put(const any& key, const any& value)
</pre>
<p>Given a representation of a key and a representation of a value, the
key and value are associated in the property map.</p>
@@ -314,16 +325,16 @@
case an error will be signaled. This is the runtime analogue of the
Readable Property Map concept.</p>
<pre class="literal-block">
-const std::type_info& key() const
+const std::type_info& key() const
</pre>
<p>Returns a <tt class="docutils literal"><span
class="pre">type_info</span></tt> object that represents the property map's key
type.</p>
<pre class="literal-block">
-const std::type_info& value() const
+const std::type_info& value() const
</pre>
<p>Returns a <tt class="docutils literal"><span
class="pre">type_info</span></tt> object that represents the property map's
value type.</p>
</div>
-<div class="section">
-<h2><a class="toc-backref" href="#id8" id="exceptions"
name="exceptions">Exceptions</a></h2>
+<div class="section" id="exceptions">
+<h2><a class="toc-backref" href="#id8" name="exceptions">Exceptions</a></h2>
<pre class="literal-block">
struct dynamic_property_exception : public std::exception {
virtual ~dynamic_property_exception() throw() {}
@@ -362,10 +373,9 @@
</div>
</div>
</div>
+<hr class="docutils footer" />
<div class="footer">
-<hr class="footer" />
-Generated on: 2007-05-02 20:47 UTC.
-
+Generated on: 2007-06-20 16:36 UTC.
</div>
</body>
</html>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs