Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/doc/html/abstract_variables_map.html @ 12

Last change on this file since 12 was 12, checked in by landauf, 18 years ago

added boost

File size: 7.8 KB
Line 
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>Class abstract_variables_map</title>
5<link rel="stylesheet" href="boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
7<link rel="start" href="index.html" title="The Boost C++ Libraries">
8<link rel="up" href="program_options/reference.html#id2524541" title="Header &lt;boost/program_options/variables_map.hpp&gt;">
9<link rel="prev" href="variable_value.html" title="Class variable_value">
10<link rel="next" href="variables_map.html" title="Class variables_map">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%">
14<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
15<td align="center"><a href="../../index.htm">Home</a></td>
16<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="../../people/people.htm">People</a></td>
18<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
19<td align="center"><a href="../../more/index.htm">More</a></td>
20</table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="variable_value.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id2524541"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="variables_map.html"><img src="images/next.png" alt="Next"></a>
24</div>
25<div class="refentry" lang="en">
26<a name="abstract_variables_map"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Class abstract_variables_map</span></h2>
29<p>boost::program_options::abstract_variables_map &#8212; </p>
30</div>
31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
33<span class="bold"><strong>class</strong></span> abstract_variables_map {
34<span class="bold"><strong>public</strong></span>:
35  <span class="emphasis"><em>// <a href="abstract_variables_map.html#abstract_variables_mapconstruct-copy-destruct">construct/copy/destruct</a></em></span>
36  <a href="abstract_variables_map.html#id2363244-bb">abstract_variables_map</a>();
37  <a href="abstract_variables_map.html#id2363247-bb">abstract_variables_map</a>(<span class="bold"><strong>const</strong></span> <a href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> *);
38  <a href="abstract_variables_map.html#id2434664-bb">~abstract_variables_map</a>();
39
40  <span class="emphasis"><em>// <a href="abstract_variables_map.html#id2517131-bb">public member functions</a></em></span>
41  <span class="type"><span class="bold"><strong>const</strong></span> <a href="variable_value.html" title="Class variable_value">variable_value</a> &amp;</span> <a href="abstract_variables_map.html#id2517135-bb"><span class="bold"><strong>operator</strong></span>[]</a>(<span class="bold"><strong>const</strong></span> std::string &amp;) <span class="bold"><strong>const</strong></span>;
42  <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="abstract_variables_map.html#id2373603-bb">next</a>(<a href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> *) ;
43
44  <span class="emphasis"><em>// <a href="abstract_variables_map.html#id2434666-bb">private member functions</a></em></span>
45  <span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>const</strong></span> <a href="variable_value.html" title="Class variable_value">variable_value</a> &amp;</span> <a href="abstract_variables_map.html#id2434670-bb">get</a>(<span class="bold"><strong>const</strong></span> std::string &amp;) <span class="bold"><strong>const</strong></span>;
46};</pre></div>
47<div class="refsect1" lang="en">
48<a name="id2729003"></a><h2>Description</h2>
49<p>Implements string-&gt;string mapping with convenient value casting facilities. </p>
50<div class="refsect2" lang="en">
51<a name="id2729012"></a><h3>
52<a name="abstract_variables_mapconstruct-copy-destruct"></a><code class="computeroutput">abstract_variables_map</code> construct/copy/destruct</h3>
53<div class="orderedlist"><ol type="1">
54<li><pre class="literallayout"><a name="id2363244-bb"></a>abstract_variables_map();</pre></li>
55<li><pre class="literallayout"><a name="id2363247-bb"></a>abstract_variables_map(<span class="bold"><strong>const</strong></span> <a href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> * next);</pre></li>
56<li><pre class="literallayout"><a name="id2434664-bb"></a>~abstract_variables_map();</pre></li>
57</ol></div>
58</div>
59<div class="refsect2" lang="en">
60<a name="id2729088"></a><h3>
61<a name="id2517131-bb"></a><code class="computeroutput">abstract_variables_map</code> public member functions</h3>
62<div class="orderedlist"><ol type="1">
63<li>
64<pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> <a href="variable_value.html" title="Class variable_value">variable_value</a> &amp;</span> <a name="id2517135-bb"></a><span class="bold"><strong>operator</strong></span>[](<span class="bold"><strong>const</strong></span> std::string &amp; name) <span class="bold"><strong>const</strong></span>;</pre>
65<p>Obtains the value of variable 'name', from *this and possibly from the chain of variable maps.</p>
66<div class="itemizedlist"><ul type="disc"><li>
67<p>if there's no value in *this.</p>
68<div class="itemizedlist"><ul type="circle">
69<li><p>if there's next variable map, returns value from it</p></li>
70<li><p>otherwise, returns empty value</p></li>
71</ul></div>
72</li></ul></div>
73<div class="itemizedlist"><ul type="disc"><li>
74<p>if there's defaulted value</p>
75<div class="itemizedlist"><ul type="circle">
76<li><p>if there's next varaible map, which has a non-defauled value, return that</p></li>
77<li><p>otherwise, return value from *this</p></li>
78</ul></div>
79</li></ul></div>
80<div class="itemizedlist"><ul type="disc"><li><p>if there's a non-defauled value, returns it. </p></li></ul></div>
81</li>
82<li>
83<pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2373603-bb"></a>next(<a href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> * next) ;</pre>
84<p>Sets next variable map, which will be used to find variables not found in *this. </p>
85</li>
86</ol></div>
87</div>
88<div class="refsect2" lang="en">
89<a name="id2729226"></a><h3>
90<a name="id2434666-bb"></a><code class="computeroutput">abstract_variables_map</code> private member functions</h3>
91<div class="orderedlist"><ol type="1"><li>
92<pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>const</strong></span> <a href="variable_value.html" title="Class variable_value">variable_value</a> &amp;</span> <a name="id2434670-bb"></a>get(<span class="bold"><strong>const</strong></span> std::string &amp; name) <span class="bold"><strong>const</strong></span>;</pre>
93<p>Returns value of variable 'name' stored in *this, or empty value otherwise. </p>
94</li></ol></div>
95</div>
96</div>
97</div>
98<table width="100%"><tr>
99<td align="left"></td>
100<td align="right"><small>Copyright © 2002-2004 Vladimir Prus</small></td>
101</tr></table>
102<hr>
103<div class="spirit-nav">
104<a accesskey="p" href="variable_value.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="program_options/reference.html#id2524541"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="variables_map.html"><img src="images/next.png" alt="Next"></a>
105</div>
106</body>
107</html>
Note: See TracBrowser for help on using the repository browser.