2b16c03d71f5421e917e1a12479f81948b1f1ba5
[platform/upstream/boost.git] / doc / html / boost / program_options / abstract_variables_map.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Class abstract_variables_map</title>
5 <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
8 <link rel="up" href="../../program_options/reference.html#header.boost.program_options.variables_map_hpp" 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%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
15 <td align="center"><a href="../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="variable_value.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../program_options/reference.html#header.boost.program_options.variables_map_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="variables_map.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.program_options.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</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"><span class="comment">// In header: &lt;<a class="link" href="../../program_options/reference.html#header.boost.program_options.variables_map_hpp" title="Header &lt;boost/program_options/variables_map.hpp&gt;">boost/program_options/variables_map.hpp</a>&gt;
33
34 </span>
35 <span class="keyword">class</span> <a class="link" href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> <span class="special">{</span>
36 <span class="keyword">public</span><span class="special">:</span>
37   <span class="comment">// <a class="link" href="abstract_variables_map.html#boost.program_options.abstract_variables_mapconstruct-copy-destruct">construct/copy/destruct</a></span>
38   <a class="link" href="abstract_variables_map.html#id1164409-bb"><span class="identifier">abstract_variables_map</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
39   <a class="link" href="abstract_variables_map.html#id1164410-bb"><span class="identifier">abstract_variables_map</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
40   <a class="link" href="abstract_variables_map.html#id1164245-bb"><span class="special">~</span><span class="identifier">abstract_variables_map</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
41
42   <span class="comment">// <a class="link" href="abstract_variables_map.html#id1164321-bb">public member functions</a></span>
43   <span class="keyword">const</span> <a class="link" href="variable_value.html" title="Class variable_value">variable_value</a> <span class="special">&amp;</span> <a class="link" href="abstract_variables_map.html#id1164324-bb"><span class="keyword">operator</span><span class="special">[</span><span class="special">]</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
44   <span class="keyword">void</span> <a class="link" href="abstract_variables_map.html#id1164390-bb"><span class="identifier">next</span></a><span class="special">(</span><a class="link" href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
45
46   <span class="comment">// <a class="link" href="abstract_variables_map.html#id1164246-bb">private member functions</a></span>
47   <span class="keyword">const</span> <a class="link" href="variable_value.html" title="Class variable_value">variable_value</a> <span class="special">&amp;</span> <a class="link" href="abstract_variables_map.html#id1164249-bb"><span class="identifier">get</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
48 <span class="special">}</span><span class="special">;</span></pre></div>
49 <div class="refsect1">
50 <a name="id2585848"></a><h2>Description</h2>
51 <p>Implements string-&gt;string mapping with convenient value casting facilities. </p>
52 <div class="refsect2">
53 <a name="id2585858"></a><h3>
54 <a name="boost.program_options.abstract_variables_mapconstruct-copy-destruct"></a><code class="computeroutput">abstract_variables_map</code> 
55         public
56        construct/copy/destruct</h3>
57 <div class="orderedlist"><ol class="orderedlist" type="1">
58 <li class="listitem"><pre class="literallayout"><a name="id1164409-bb"></a><span class="identifier">abstract_variables_map</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
59 <li class="listitem"><pre class="literallayout"><a name="id1164410-bb"></a><span class="identifier">abstract_variables_map</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> <span class="special">*</span> next<span class="special">)</span><span class="special">;</span></pre></li>
60 <li class="listitem"><pre class="literallayout"><a name="id1164245-bb"></a><span class="special">~</span><span class="identifier">abstract_variables_map</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
61 </ol></div>
62 </div>
63 <div class="refsect2">
64 <a name="id2585990"></a><h3>
65 <a name="id1164321-bb"></a><code class="computeroutput">abstract_variables_map</code> public member functions</h3>
66 <div class="orderedlist"><ol class="orderedlist" type="1">
67 <li class="listitem">
68 <pre class="literallayout"><span class="keyword">const</span> <a class="link" href="variable_value.html" title="Class variable_value">variable_value</a> <span class="special">&amp;</span> <a name="id1164324-bb"></a><span class="keyword">operator</span><span class="special">[</span><span class="special">]</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> name<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
69 <p>Obtains the value of variable 'name', from *this and possibly from the chain of variable maps.</p>
70 <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
71 <p>if there's no value in *this.</p>
72 <div class="itemizedlist"><ul class="itemizedlist" type="circle">
73 <li class="listitem"><p>if there's next variable map, returns value from it</p></li>
74 <li class="listitem"><p>otherwise, returns empty value</p></li>
75 </ul></div>
76 <p>
77 </p>
78 </li></ul></div>
79 <p>
80 </p>
81 <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
82 <p>if there's defaulted value</p>
83 <div class="itemizedlist"><ul class="itemizedlist" type="circle">
84 <li class="listitem"><p>if there's next varaible map, which has a non-defauled value, return that</p></li>
85 <li class="listitem"><p>otherwise, return value from *this</p></li>
86 </ul></div>
87 <p>
88 </p>
89 </li></ul></div>
90 <p>
91 </p>
92 <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>if there's a non-defauled value, returns it. </p></li></ul></div>
93 <p>
94 </p>
95 </li>
96 <li class="listitem">
97 <pre class="literallayout"><span class="keyword">void</span> <a name="id1164390-bb"></a><span class="identifier">next</span><span class="special">(</span><a class="link" href="abstract_variables_map.html" title="Class abstract_variables_map">abstract_variables_map</a> <span class="special">*</span> next<span class="special">)</span><span class="special">;</span></pre>
98 <p>Sets next variable map, which will be used to find variables not found in *this. </p>
99 </li>
100 </ol></div>
101 </div>
102 <div class="refsect2">
103 <a name="id2586198"></a><h3>
104 <a name="id1164246-bb"></a><code class="computeroutput">abstract_variables_map</code> private member functions</h3>
105 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
106 <pre class="literallayout"><span class="keyword">const</span> <a class="link" href="variable_value.html" title="Class variable_value">variable_value</a> <span class="special">&amp;</span> <a name="id1164249-bb"></a><span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> name<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
107 <p>Returns value of variable 'name' stored in *this, or empty value otherwise. </p>
108 </li></ol></div>
109 </div>
110 </div>
111 </div>
112 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
113 <td align="left"></td>
114 <td align="right"><div class="copyright-footer">Copyright &#169; 2002-2004 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0.
115       (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at 
116       <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
117       </p>
118 </div></td>
119 </tr></table>
120 <hr>
121 <div class="spirit-nav">
122 <a accesskey="p" href="variable_value.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../program_options/reference.html#header.boost.program_options.variables_map_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="variables_map.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
123 </div>
124 </body>
125 </html>