1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Type style_t</title> 6<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="../../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="../../../program_options/reference.html#header.boost.program_options.cmdline_hpp" title="Header <boost/program_options/cmdline.hpp>"> 10<link rel="prev" href="../../../program_options/reference.html" title="Reference"> 11<link rel="next" href="../../../BOOST_PROGRAM_OPTIONS_DECL.html" title="Macro BOOST_PROGRAM_OPTIONS_DECL"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> 16<td align="center"><a href="../../../../../index.html">Home</a></td> 17<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../../../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<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> 25</div> 26<div class="refentry"> 27<a name="boost.program_options.command_line_style.style_t"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Type style_t</span></h2> 30<p>boost::program_options::command_line_style::style_t</p> 31</div> 32<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 33<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../../program_options/reference.html#header.boost.program_options.cmdline_hpp" title="Header <boost/program_options/cmdline.hpp>">boost/program_options/cmdline.hpp</a>> 34 35</span> 36<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 << 1, 37 <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 << 1, 38 <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 << 1, 39 <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 << 1, 40 <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 << 1, 41 <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 << 1, 42 <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 << 1, 43 <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.allow_sticky">allow_sticky</a> = = short_allow_next << 1, 44 <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.allow_guessing">allow_guessing</a> = = allow_sticky << 1, 45 <a class="link" href="style_t.html#boost.program_options.command_line_style.style_t.long_case_insensitive">long_case_insensitive</a> = = allow_guessing << 1, 46 <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 << 1, 47 <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), 48 <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 << 1, 49 <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 50 | allow_long | long_allow_adjacent | long_allow_next 51 | allow_sticky | allow_guessing 52 | allow_dash_for_short), 53 <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> 54<div class="refsect1"> 55<a name="id-1.3.31.9.2.3.4"></a><h2>Description</h2> 56<p>Various possible styles of options.</p> 57<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> 58<p>Option's value can be specified in the same token as name ("--foo=bar"), or in the next token.</p> 59<p>It's possible to introduce long options by the same character as short options, see allow_long_disguise.</p> 60<p>Finally, guessing (specifying only prefix of option) and case insensitive processing are supported. </p> 61<div class="variablelist"><dl class="variablelist compact"> 62<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> 63<dd>Allow "--long_name" style. </dd> 64<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> 65<dd>Allow "-<single character" style. </dd> 66<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> 67<dd>Allow "-" in short options. </dd> 68<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> 69<dd>Allow "/" in short options. </dd> 70<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> 71<dd><p>Allow option parameter in the same token for long option, like in --foo=10 </p></dd> 72<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> 73<dd><p>Allow option parameter in the next token for long options. </p></dd> 74<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> 75<dd><p>Allow option parameter in the same token for short options. </p></dd> 76<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> 77<dd><p>Allow option parameter in the next token for short options. </p></dd> 78<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> 79<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> 80<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> 81<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> 82<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> 83<dd><p>Ignore the difference in case for long options. </p></dd> 84<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> 85<dd><p>Ignore the difference in case for short options. </p></dd> 86<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> 87<dd><p>Ignore the difference in case for all options. </p></dd> 88<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> 89<dd><p>Allow long options with single option starting character, e.g <code class="computeroutput">-foo=10</code> </p></dd> 90<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> 91<dd><p>The more-or-less traditional unix style. </p></dd> 92<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> 93<dd><p>The default style. </p></dd> 94</dl></div> 95</div> 96</div> 97<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 98<td align="left"></td> 99<td align="right"><div class="copyright-footer">Copyright © 2002-2004 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. 100 (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at 101 <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 102 </p> 103</div></td> 104</tr></table> 105<hr> 106<div class="spirit-nav"> 107<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> 108</div> 109</body> 110</html> 111