summaryrefslogtreecommitdiff
path: root/doc/html/boost/program_options/command_line_style/style_t.html
blob: 26e97b958bc8a7cf66264de93ad34a81dda56383 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Type style_t</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="../../../program_options/reference.html#header.boost.program_options.cmdline_hpp" title="Header &lt;boost/program_options/cmdline.hpp&gt;">
<link rel="prev" href="../../../program_options/reference.html" title="Reference">
<link rel="next" href="../../../BOOST_PROGRAM_OPTIONS_DECL.html" title="Macro BOOST_PROGRAM_OPTIONS_DECL">
</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="../../../program_options/reference.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../program_options/reference.html#header.boost.program_options.cmdline_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="../../../BOOST_PROGRAM_OPTIONS_DECL.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.program_options.command_line_style.style_t"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Type style_t</span></h2>
<p>boost::program_options::command_line_style::style_t</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<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.cmdline_hpp" title="Header &lt;boost/program_options/cmdline.hpp&gt;">boost/program_options/cmdline.hpp</a>&gt;

</span>
<span class="keyword">enum</span> <span class="identifier">style_t</span> <span class="special">{</span> <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.allow_long">allow_long</a> = = 1, <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.allow_short">allow_short</a> = = allow_long &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.allow_dash_for_short">allow_dash_for_short</a> = = allow_short &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.allow_slash_for_short">allow_slash_for_short</a> = = allow_dash_for_short &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.long_allow_adjacent">long_allow_adjacent</a> = = allow_slash_for_short &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.long_allow_next">long_allow_next</a> = = long_allow_adjacent &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.short_allow_adjacent">short_allow_adjacent</a> = = long_allow_next &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.short_allow_next">short_allow_next</a> = = short_allow_adjacent &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.allow_sticky">allow_sticky</a> = = short_allow_next &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.allow_guessing">allow_guessing</a> = = allow_sticky &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.long_case_insensitive">long_case_insensitive</a> = = allow_guessing &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.short_case_insensitive">short_case_insensitive</a> = = long_case_insensitive &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.case_insensitive">case_insensitive</a> = = (long_case_insensitive | short_case_insensitive), 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.allow_long_disguise">allow_long_disguise</a> = = short_case_insensitive &lt;&lt; 1, 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.unix_style">unix_style</a> = = (allow_short | short_allow_adjacent | short_allow_next
                      | allow_long | long_allow_adjacent | long_allow_next
                      | allow_sticky | allow_guessing 
                      | allow_dash_for_short), 
               <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.default_style">default_style</a> = = unix_style <span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idp343532544"></a><h2>Description</h2>
<p>Various possible styles of options.</p>
<p>There are "long" options, which start with "--" and "short", which start with either "-" or "/". Both kinds can be allowed or disallowed, see allow_long and allow_short. The allowed character for short options is also configurable.</p>
<p>Option's value can be specified in the same token as name ("--foo=bar"), or in the next token.</p>
<p>It's possible to introduce long options by the same character as short options, see allow_long_disguise.</p>
<p>Finally, guessing (specifying only prefix of option) and case insensitive processing are supported. </p>
<div class="variablelist"><dl class="variablelist compact">
<dt><span class="term"><code class="computeroutput">allow_long</code><a name="boost.program_options.command_line_style.style_t.allow_long"></a></span></dt>
<dd>Allow "--long_name" style. </dd>
<dt><span class="term"><code class="computeroutput">allow_short</code><a name="boost.program_options.command_line_style.style_t.allow_short"></a></span></dt>
<dd>Allow "-&lt;single character" style. </dd>
<dt><span class="term"><code class="computeroutput">allow_dash_for_short</code><a name="boost.program_options.command_line_style.style_t.allow_dash_for_short"></a></span></dt>
<dd>Allow "-" in short options. </dd>
<dt><span class="term"><code class="computeroutput">allow_slash_for_short</code><a name="boost.program_options.command_line_style.style_t.allow_slash_for_short"></a></span></dt>
<dd>Allow "/" in short options. </dd>
<dt><span class="term"><code class="computeroutput">long_allow_adjacent</code><a name="boost.program_options.command_line_style.style_t.long_allow_adjacent"></a></span></dt>
<dd><p>Allow option parameter in the same token for long option, like in         --foo=10 </p></dd>
<dt><span class="term"><code class="computeroutput">long_allow_next</code><a name="boost.program_options.command_line_style.style_t.long_allow_next"></a></span></dt>
<dd><p>Allow option parameter in the next token for long options. </p></dd>
<dt><span class="term"><code class="computeroutput">short_allow_adjacent</code><a name="boost.program_options.command_line_style.style_t.short_allow_adjacent"></a></span></dt>
<dd><p>Allow option parameter in the same token for short options. </p></dd>
<dt><span class="term"><code class="computeroutput">short_allow_next</code><a name="boost.program_options.command_line_style.style_t.short_allow_next"></a></span></dt>
<dd><p>Allow option parameter in the next token for short options. </p></dd>
<dt><span class="term"><code class="computeroutput">allow_sticky</code><a name="boost.program_options.command_line_style.style_t.allow_sticky"></a></span></dt>
<dd><p>Allow to merge several short options together, so that "-s -k" become "-sk". All of the options but last should accept no parameter. For example, if "-s" accept a parameter, then "k" will be taken as parameter, not another short option. Dos-style short options cannot be sticky. </p></dd>
<dt><span class="term"><code class="computeroutput">allow_guessing</code><a name="boost.program_options.command_line_style.style_t.allow_guessing"></a></span></dt>
<dd><p>Allow abbreviated spellings for long options, if they unambiguously identify long option. No long option name should be prefix of other long option name if guessing is in effect. </p></dd>
<dt><span class="term"><code class="computeroutput">long_case_insensitive</code><a name="boost.program_options.command_line_style.style_t.long_case_insensitive"></a></span></dt>
<dd><p>Ignore the difference in case for long options. </p></dd>
<dt><span class="term"><code class="computeroutput">short_case_insensitive</code><a name="boost.program_options.command_line_style.style_t.short_case_insensitive"></a></span></dt>
<dd><p>Ignore the difference in case for short options. </p></dd>
<dt><span class="term"><code class="computeroutput">case_insensitive</code><a name="boost.program_options.command_line_style.style_t.case_insensitive"></a></span></dt>
<dd><p>Ignore the difference in case for all options. </p></dd>
<dt><span class="term"><code class="computeroutput">allow_long_disguise</code><a name="boost.program_options.command_line_style.style_t.allow_long_disguise"></a></span></dt>
<dd><p>Allow long options with single option starting character, e.g <code class="computeroutput">-foo=10</code> </p></dd>
<dt><span class="term"><code class="computeroutput">unix_style</code><a name="boost.program_options.command_line_style.style_t.unix_style"></a></span></dt>
<dd><p>The more-or-less traditional unix style. </p></dd>
<dt><span class="term"><code class="computeroutput">default_style</code><a name="boost.program_options.command_line_style.style_t.default_style"></a></span></dt>
<dd><p>The default style. </p></dd>
</dl></div>
</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">Copyright &#169; 2002-2004 Vladimir Prus<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></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../program_options/reference.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../program_options/reference.html#header.boost.program_options.cmdline_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="../../../BOOST_PROGRAM_OPTIONS_DECL.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>