Sophie

Sophie

distrib > Mageia > 6 > armv5tl > by-pkgid > 37eb773c4f50677290a7937043b43933 > files > 7665

boost-devel-doc-1.60.0-6.1.mga6.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter&#160;22.&#160;Boost.Program_options</title>
<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="libraries.html" title="Part&#160;I.&#160;The Boost C++ Libraries (BoostBook Subset)">
<link rel="prev" href="mpi/python.html" title="Python Bindings">
<link rel="next" href="program_options/tutorial.html" title="Tutorial">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
<td align="center"><a href="../../index.html">Home</a></td>
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="mpi/python.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><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="program_options/tutorial.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="program_options"></a>Chapter&#160;22.&#160;Boost.Program_options</h2></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Vladimir</span> <span class="surname">Prus</span>
</h3></div></div>
<div><p class="copyright">Copyright &#169; 2002-2004 Vladimir Prus</p></div>
<div><div class="legalnotice">
<a name="idm45555218484784"></a><p>Distributed under the Boost Software License, Version 1.0.
      (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at 
      <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="section"><a href="program_options.html#idm45555218482016">Introduction</a></span></dt>
<dt><span class="section"><a href="program_options/tutorial.html">Tutorial</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="program_options/tutorial.html#idm45555218472112">Getting Started</a></span></dt>
<dt><span class="section"><a href="program_options/tutorial.html#idm45555218453872">Option Details</a></span></dt>
<dt><span class="section"><a href="program_options/tutorial.html#idm45555218427440">Multiple Sources</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="program_options/overview.html">Library Overview</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="program_options/overview.html#idm45555218399280">Options Description Component</a></span></dt>
<dt><span class="section"><a href="program_options/overview.html#idm45555218336304">Parsers Component</a></span></dt>
<dt><span class="section"><a href="program_options/overview.html#idm45555218325888">Storage Component</a></span></dt>
<dt><span class="section"><a href="program_options/overview.html#idm45555218314512">Specific parsers</a></span></dt>
<dt><span class="section"><a href="program_options/overview.html#idm45555218282592">Annotated List of Symbols</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="program_options/howto.html">How To</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="program_options/howto.html#idm45555218255664">Non-conventional Syntax</a></span></dt>
<dt><span class="section"><a href="program_options/howto.html#idm45555218249552">Response Files</a></span></dt>
<dt><span class="section"><a href="program_options/howto.html#idm45555218241536">Winmain Command Line</a></span></dt>
<dt><span class="section"><a href="program_options/howto.html#idm45555218236304">Option Groups and Hidden Options</a></span></dt>
<dt><span class="section"><a href="program_options/howto.html#idm45555218221088">Custom Validators</a></span></dt>
<dt><span class="section"><a href="program_options/howto.html#idm45555218212368">Unicode Support</a></span></dt>
<dt><span class="section"><a href="program_options/howto.html#idm45555218193088">Allowing Unknown Options</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="program_options/design.html">Design Discussion</a></span></dt>
<dd><dl><dt><span class="section"><a href="program_options/design.html#program_options.design.unicode">Unicode Support</a></span></dt></dl></dd>
<dt><span class="section"><a href="program_options/s06.html">Acknowledgements</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html">Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.cmdline_hpp">Header &lt;boost/program_options/cmdline.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.config_hpp">Header &lt;boost/program_options/config.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.environment_iterator_hpp">Header &lt;boost/program_options/environment_iterator.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.eof_iterator_hpp">Header &lt;boost/program_options/eof_iterator.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.errors_hpp">Header &lt;boost/program_options/errors.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.option_hpp">Header &lt;boost/program_options/option.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.options_description_hpp">Header &lt;boost/program_options/options_description.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.parsers_hpp">Header &lt;boost/program_options/parsers.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.positional_options_hpp">Header &lt;boost/program_options/positional_options.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.value_semantic_hpp">Header &lt;boost/program_options/value_semantic.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.variables_map_hpp">Header &lt;boost/program_options/variables_map.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="program_options/reference.html#header.boost.program_options.version_hpp">Header &lt;boost/program_options/version.hpp&gt;</a></span></dt>
</dl></dd>
</dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="idm45555218482016"></a>Introduction</h2></div></div></div>
<p>The program_options library allows program developers to obtain
    <span class="emphasis"><em>program options</em></span>, that is (name, value) pairs from the user,
    via conventional methods such as command line and config file.</p>
<p>Why would you use such a library, and why is it better than parsing
    your command line by straightforward hand-written code?
      </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>It's easier. The syntax for declaring options is simple, and
          the library itself is small. Things like conversion of option values to
          desired type and storing into program variables are handled
          automatically.
          </p></li>
<li class="listitem"><p>Error reporting is better. All the problems with the command line are
            reported, while hand-written code can just misparse the input. In
            addition, the usage message can be automatically generated, to
            avoid falling out of sync with the real list of options.</p></li>
<li class="listitem"><p>Options can be read from anywhere. Sooner or later the command
          line will be not enough for your users, and you'll want config files
          or maybe even environment variables. These can be added without significant 
          effort on your part.
          </p></li>
</ul></div>
<p>
    </p>
<p>
      Now let's see some examples of the library usage in the <a class="xref" href="program_options/tutorial.html" title="Tutorial">the section called &#8220;Tutorial&#8221;</a>.
    </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="mpi/python.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><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="program_options/tutorial.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>