<!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>Class error_with_no_option_name</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.errors_hpp" title="Header <boost/program_options/errors.hpp>"> <link rel="prev" href="error.html" title="Class error"> <link rel="next" href="error_with_option_name.html" title="Class error_with_option_name"> </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="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> </div> <div class="refentry"> <a name="boost.program_options.error_with_no_option_name"></a><div class="titlepage"></div> <div class="refnamediv"> <h2><span class="refentrytitle">Class error_with_no_option_name</span></h2> <p>boost::program_options::error_with_no_option_name</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: <<a class="link" href="../../program_options/reference.html#header.boost.program_options.errors_hpp" title="Header <boost/program_options/errors.hpp>">boost/program_options/errors.hpp</a>> </span> <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> <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> <span class="special">{</span> <span class="keyword">public</span><span class="special">:</span> <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> <a class="link" href="error_with_no_option_name.html#idm45507103981568-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">&</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">&</span> <span class="special">=</span> <span class="string">""</span><span class="special">)</span><span class="special">;</span> <a class="link" href="error_with_no_option_name.html#idm45506969969568-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> <span class="comment">// <a class="link" href="error_with_no_option_name.html#idm45506984700224-bb">public member functions</a></span> <span class="keyword">virtual</span> <span class="keyword">void</span> <a class="link" href="error_with_no_option_name.html#idm45506984699664-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">&</span><span class="special">)</span><span class="special">;</span> <span class="special">}</span><span class="special">;</span></pre></div> <div class="refsect1"> <a name="idm45555217668304"></a><h2>Description</h2> <p>Base class of unparsable options, when the desired option cannot be identified.</p> <p>It makes no sense to have an option name, when we can't match an option to the parameter</p> <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> <div class="refsect2"> <a name="idm45555217665808"></a><h3> <a name="boost.program_options.error_with_no_option_nameconstruct-copy-destruct"></a><code class="computeroutput">error_with_no_option_name</code> public construct/copy/destruct</h3> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"><pre class="literallayout"><a name="idm45507103981568-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">&</span> template_<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">&</span> original_token <span class="special">=</span> <span class="string">""</span><span class="special">)</span><span class="special">;</span></pre></li> <li class="listitem"><pre class="literallayout"><a name="idm45506969969568-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> </ol></div> </div> <div class="refsect2"> <a name="idm45555217647472"></a><h3> <a name="idm45506984700224-bb"></a><code class="computeroutput">error_with_no_option_name</code> public member functions</h3> <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> <pre class="literallayout"><span class="keyword">virtual</span> <span class="keyword">void</span> <a name="idm45506984699664-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">&</span><span class="special">)</span><span class="special">;</span></pre> <p>Does NOT set option name, because no option name makes sense </p> </li></ol></div> </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 © 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="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> </div> </body> </html>