1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
---|
4 | <title>Class 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 <boost/program_options/variables_map.hpp>"> |
---|
9 | <link rel="prev" href="abstract_variables_map.html" title="Class abstract_variables_map"> |
---|
10 | <link rel="next" href="id2349650.html" title="Function store"> |
---|
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="abstract_variables_map.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="id2349650.html"><img src="images/next.png" alt="Next"></a> |
---|
24 | </div> |
---|
25 | <div class="refentry" lang="en"> |
---|
26 | <a name="variables_map"></a><div class="titlepage"></div> |
---|
27 | <div class="refnamediv"> |
---|
28 | <h2><span class="refentrytitle">Class variables_map</span></h2> |
---|
29 | <p>boost::program_options::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"> |
---|
33 | <span class="bold"><strong>class</strong></span> variables_map |
---|
34 | : : <span class="bold"><strong>public</strong></span> boost::program_options::abstract_variables_map |
---|
35 | { |
---|
36 | <span class="bold"><strong>public</strong></span>: |
---|
37 | <span class="emphasis"><em>// <a href="variables_map.html#variables_mapconstruct-copy-destruct">construct/copy/destruct</a></em></span> |
---|
38 | <a href="variables_map.html#id2425267-bb">variables_map</a>(); |
---|
39 | <a href="variables_map.html#id2425269-bb">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> *); |
---|
40 | |
---|
41 | <span class="emphasis"><em>// <a href="variables_map.html#id2359634-bb">public member functions</a></em></span> |
---|
42 | <span class="type"><span class="bold"><strong>const</strong></span> <a href="variable_value.html" title="Class variable_value">variable_value</a> &</span> <a href="variables_map.html#id2359639-bb"><span class="bold"><strong>operator</strong></span>[]</a>(<span class="bold"><strong>const</strong></span> std::string &) <span class="bold"><strong>const</strong></span>; |
---|
43 | |
---|
44 | <span class="emphasis"><em>// <a href="variables_map.html#id2425287-bb">private member functions</a></em></span> |
---|
45 | <span class="type"><span class="bold"><strong>const</strong></span> <a href="variable_value.html" title="Class variable_value">variable_value</a> &</span> <a href="variables_map.html#id2425291-bb">get</a>(<span class="bold"><strong>const</strong></span> std::string &) <span class="bold"><strong>const</strong></span>; |
---|
46 | };</pre></div> |
---|
47 | <div class="refsect1" lang="en"> |
---|
48 | <a name="id2729474"></a><h2>Description</h2> |
---|
49 | <p>Concrete variables map which store variables in real map. </p> |
---|
50 | <div class="refsect2" lang="en"> |
---|
51 | <a name="id2729481"></a><h3> |
---|
52 | <a name="variables_mapconstruct-copy-destruct"></a><code class="computeroutput">variables_map</code> construct/copy/destruct</h3> |
---|
53 | <div class="orderedlist"><ol type="1"> |
---|
54 | <li><pre class="literallayout"><a name="id2425267-bb"></a>variables_map();</pre></li> |
---|
55 | <li><pre class="literallayout"><a name="id2425269-bb"></a>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 | </ol></div> |
---|
57 | </div> |
---|
58 | <div class="refsect2" lang="en"> |
---|
59 | <a name="id2729543"></a><h3> |
---|
60 | <a name="id2359634-bb"></a><code class="computeroutput">variables_map</code> public member functions</h3> |
---|
61 | <div class="orderedlist"><ol type="1"><li> |
---|
62 | <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> &</span> <a name="id2359639-bb"></a><span class="bold"><strong>operator</strong></span>[](<span class="bold"><strong>const</strong></span> std::string & name) <span class="bold"><strong>const</strong></span>;</pre> |
---|
63 | <p>Obtains the value of variable 'name', from *this and possibly from the chain of variable maps.</p> |
---|
64 | <div class="itemizedlist"><ul type="disc"><li> |
---|
65 | <p>if there's no value in *this.</p> |
---|
66 | <div class="itemizedlist"><ul type="circle"> |
---|
67 | <li><p>if there's next variable map, returns value from it</p></li> |
---|
68 | <li><p>otherwise, returns empty value</p></li> |
---|
69 | </ul></div> |
---|
70 | </li></ul></div> |
---|
71 | <div class="itemizedlist"><ul type="disc"><li> |
---|
72 | <p>if there's defaulted value</p> |
---|
73 | <div class="itemizedlist"><ul type="circle"> |
---|
74 | <li><p>if there's next varaible map, which has a non-defauled value, return that</p></li> |
---|
75 | <li><p>otherwise, return value from *this</p></li> |
---|
76 | </ul></div> |
---|
77 | </li></ul></div> |
---|
78 | <div class="itemizedlist"><ul type="disc"><li><p>if there's a non-defauled value, returns it. </p></li></ul></div> |
---|
79 | </li></ol></div> |
---|
80 | </div> |
---|
81 | <div class="refsect2" lang="en"> |
---|
82 | <a name="id2729649"></a><h3> |
---|
83 | <a name="id2425287-bb"></a><code class="computeroutput">variables_map</code> private member functions</h3> |
---|
84 | <div class="orderedlist"><ol type="1"><li> |
---|
85 | <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> &</span> <a name="id2425291-bb"></a>get(<span class="bold"><strong>const</strong></span> std::string & name) <span class="bold"><strong>const</strong></span>;</pre> |
---|
86 | <p>Implementation of abstract_variables_map::get which does 'find' in *this. </p> |
---|
87 | </li></ol></div> |
---|
88 | </div> |
---|
89 | </div> |
---|
90 | </div> |
---|
91 | <table width="100%"><tr> |
---|
92 | <td align="left"></td> |
---|
93 | <td align="right"><small>Copyright © 2002-2004 Vladimir Prus</small></td> |
---|
94 | </tr></table> |
---|
95 | <hr> |
---|
96 | <div class="spirit-nav"> |
---|
97 | <a accesskey="p" href="abstract_variables_map.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="id2349650.html"><img src="images/next.png" alt="Next"></a> |
---|
98 | </div> |
---|
99 | </body> |
---|
100 | </html> |
---|