• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>Class error_with_no_option_name</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.errors_hpp" title="Header &lt;boost/program_options/errors.hpp&gt;">
10<link rel="prev" href="error.html" title="Class error">
11<link rel="next" href="error_with_option_name.html" title="Class error_with_option_name">
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="error.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../program_options/reference.html#header.boost.program_options.errors_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="error_with_option_name.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
25</div>
26<div class="refentry">
27<a name="boost.program_options.error_with_no_option_name"></a><div class="titlepage"></div>
28<div class="refnamediv">
29<h2><span class="refentrytitle">Class error_with_no_option_name</span></h2>
30<p>boost::program_options::error_with_no_option_name</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: &lt;<a class="link" href="../../program_options/reference.html#header.boost.program_options.errors_hpp" title="Header &lt;boost/program_options/errors.hpp&gt;">boost/program_options/errors.hpp</a>&gt;
34
35</span>
36<span class="keyword">class</span> <a class="link" href="error_with_no_option_name.html" title="Class error_with_no_option_name">error_with_no_option_name</a> <span class="special">:</span>
37  <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">program_options</span><span class="special">::</span><span class="identifier">error_with_option_name</span>
38<span class="special">{</span>
39<span class="keyword">public</span><span class="special">:</span>
40  <span class="comment">// <a class="link" href="error_with_no_option_name.html#boost.program_options.error_with_no_option_nameconstruct-copy-destruct">construct/copy/destruct</a></span>
41  <a class="link" href="error_with_no_option_name.html#id-1_3_31_9_5_1_1_3_4-bb"><span class="identifier">error_with_no_option_name</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="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="string">""</span><span class="special">)</span><span class="special">;</span>
42  <a class="link" href="error_with_no_option_name.html#id-1_3_31_9_5_1_1_3_5-bb"><span class="special">~</span><span class="identifier">error_with_no_option_name</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
43
44  <span class="comment">// <a class="link" href="error_with_no_option_name.html#id-1_3_31_9_5_1_1_3_3-bb">public member functions</a></span>
45  <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="error_with_no_option_name.html#id-1_3_31_9_5_1_1_3_3_1-bb"><span class="identifier">set_option_name</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="special">;</span>
46<span class="special">}</span><span class="special">;</span></pre></div>
47<div class="refsect1">
48<a name="id-1.3.31.9.6.5.4"></a><h2>Description</h2>
49<p>Base class of unparsable options, when the desired option cannot be identified.</p>
50<p>It makes no sense to have an option name, when we can't match an option to the parameter</p>
51<p>Having this a part of the <a class="link" href="error_with_option_name.html" title="Class error_with_option_name">error_with_option_name</a> hierachy makes error handling a lot easier, even if the name indicates some sort of conceptual dissonance! </p>
52<div class="refsect2">
53<a name="id-1.3.31.9.6.5.4.5"></a><h3>
54<a name="boost.program_options.error_with_no_option_nameconstruct-copy-destruct"></a><code class="computeroutput">error_with_no_option_name</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="id-1_3_31_9_5_1_1_3_4-bb"></a><span class="identifier">error_with_no_option_name</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> template_<span class="special">,</span>
59                          <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> original_token <span class="special">=</span> <span class="string">""</span><span class="special">)</span><span class="special">;</span></pre></li>
60<li class="listitem"><pre class="literallayout"><a name="id-1_3_31_9_5_1_1_3_5-bb"></a><span class="special">~</span><span class="identifier">error_with_no_option_name</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="id-1.3.31.9.6.5.4.6"></a><h3>
65<a name="id-1_3_31_9_5_1_1_3_3-bb"></a><code class="computeroutput">error_with_no_option_name</code> public member functions</h3>
66<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
67<pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="id-1_3_31_9_5_1_1_3_3_1-bb"></a><span class="identifier">set_option_name</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><span class="special">)</span><span class="special">;</span></pre>
68<p>Does NOT set option name, because no option name makes sense </p>
69</li></ol></div>
70</div>
71</div>
72</div>
73<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
74<td align="left"></td>
75<td align="right"><div class="copyright-footer">Copyright © 2002-2004 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0.
76      (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at
77      <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
78      </p>
79</div></td>
80</tr></table>
81<hr>
82<div class="spirit-nav">
83<a accesskey="p" href="error.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../program_options/reference.html#header.boost.program_options.errors_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="error_with_option_name.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
84</div>
85</body>
86</html>
87