<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>GNU CommonC++: ost::CommandOption Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.6 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li id="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul></div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div> <div class="nav"> <a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_command_option.html">CommandOption</a></div> <h1>ost::CommandOption Class Reference</h1><!-- doxytag: class="ost::CommandOption" --><a class="el" href="classost_1_1_command_option.html">CommandOption</a> is the base class for all command line options. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="cmdoptns_8h-source.html">cmdoptns.h</a>></code> <p> <p>Inheritance diagram for ost::CommandOption: <p><center><img src="classost_1_1_command_option.png" usemap="#ost::CommandOption_map" border="0" alt=""></center> <map name="ost::CommandOption_map"> <area href="classost_1_1_command_option_no_arg.html" alt="ost::CommandOptionNoArg" shape="rect" coords="0,56,171,80"> <area href="classost_1_1_command_option_with_arg.html" alt="ost::CommandOptionWithArg" shape="rect" coords="181,56,352,80"> <area href="classost_1_1_command_option_arg.html" alt="ost::CommandOptionArg" shape="rect" coords="0,112,171,136"> <area href="classost_1_1_command_option_collect.html" alt="ost::CommandOptionCollect" shape="rect" coords="181,112,352,136"> <area href="classost_1_1_command_option_rest.html" alt="ost::CommandOptionRest" shape="rect" coords="362,112,533,136"> </map> <a href="classost_1_1_command_option-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa493">OptionType</a> { <a class="el" href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa49351afdccef3c1eefa378b4ea79872fb9f">hasArg</a>, <a class="el" href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa493206297cbdc29de03edfa0e24d589b227">noArg</a>, <a class="el" href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa4934fbaf902c23f48a6d217585297f3afb5">trailing</a>, <a class="el" href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa4939ebaee9fbe6ef1338347908f6e410095">collect</a> }</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">OptionType is for denoting what type of option this is, with an arg, without an arg or the trailing args.Option type. <a href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa493">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#7e42ca61d049698df46daae73bb205bb">~CommandOption</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A virtual destructor just in case. <a href="#7e42ca61d049698df46daae73bb205bb"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#989bf900aed6323812ae6922edcdc4af">CommandOption</a> (const char *inOptionName, const char *inOptionLetter, const char *inDescription, <a class="el" href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa493">OptionType</a> inOptionType, bool inRequired=false, <a class="el" href="classost_1_1_command_option.html">CommandOption</a> **ppNext=&<a class="el" href="namespaceost.html#3b701311bbf7cf16f954820e316f5766">defaultCommandOptionList</a>)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classost_1_1_command_option.html">CommandOption</a> contructor. <a href="#989bf900aed6323812ae6922edcdc4af"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#70394fb2a025443e6890e0e076a94477">foundOption</a> (<a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> *cop, const char *value=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">foundOption is called by the <a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> object during the parsing of the command line options. <a href="#70394fb2a025443e6890e0e076a94477"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#c6597549063ded15f8d50d72e8cd9bf6">foundOption</a> (<a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> *cop, const char **value, int num)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">foundOption is called by the <a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> object during the parsing of the command line options. <a href="#c6597549063ded15f8d50d72e8cd9bf6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#1cc99afcc775ca21d16c38a0661839a2">parseDone</a> (<a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> *cop)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Once parsing of command line options is complete, this method is called. <a href="#1cc99afcc775ca21d16c38a0661839a2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#f52fe62b7a0d3c40b726fa2447cb3b78">performTask</a> (<a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> *cop)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Once <a class="el" href="classost_1_1_command_option.html">CommandOption</a> objects have completed parsing and there are no errors they may have some specific tasks to perform. <a href="#f52fe62b7a0d3c40b726fa2447cb3b78"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#cf1272321b17a2cbe953ce23ffa6a5e8">hasValue</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">For fields with the required flag set, this method is used to determine if the Option has satisfied it's required status. <a href="#cf1272321b17a2cbe953ce23ffa6a5e8"></a><br></td></tr> <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#3cf7d6f9d1943e981d29c38e2e188231">optionName</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Long option name, these will be preceded with "--" on the command line. <a href="#3cf7d6f9d1943e981d29c38e2e188231"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#c894a27c5aeeb70ff07387bb721bd7c6">optionLetter</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">option letter, these will be preceded with "-" on the command line. <a href="#c894a27c5aeeb70ff07387bb721bd7c6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#e7c1ad2ef21198b1bef933847ff5d197">description</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A short description of the option for Usage messages. <a href="#e7c1ad2ef21198b1bef933847ff5d197"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa493">OptionType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#2e5f9f895bda7cf7dbe48e0106866368">optionType</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This command option's OptionType. <a href="#2e5f9f895bda7cf7dbe48e0106866368"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#05f8b1439cbf0cf33f47707a33baad57">required</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">True if this parameter is required. <a href="#05f8b1439cbf0cf33f47707a33baad57"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_command_option.html">CommandOption</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_command_option.html#0dd94d805913bf11cd188de53baaf27c">next</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This next <a class="el" href="classost_1_1_command_option.html">CommandOption</a> in this list of options or nil if no more options exist. <a href="#0dd94d805913bf11cd188de53baaf27c"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <a class="el" href="classost_1_1_command_option.html">CommandOption</a> is the base class for all command line options. <p> Command line options can be defined statically and used when constructing a command line parser onject using makeCommandOptionParse. This serves only as a base class to <a class="el" href="classost_1_1_command_option_with_arg.html">CommandOptionWithArg</a>, <a class="el" href="classost_1_1_command_option_rest.html">CommandOptionRest</a> or <a class="el" href="classost_1_1_command_option_no_arg.html">CommandOptionNoArg</a> which can also be used to derive more complex classes or even entire applications.<p> <dl compact><dt><b>Author:</b></dt><dd>Gianni Mariani <<a href="mailto:gianni@mariani.ws">gianni@mariani.ws</a>> </dd></dl> <dl compact><dt><b>Examples: </b></dt><dd> <p> <a class="el" href="cmdlineopt_8cpp-example.html#_a14">cmdlineopt.cpp</a>.</dl> <p> <hr><h2>Member Enumeration Documentation</h2> <a class="anchor" name="b56f222627bb3843d2b055d42ceaa493"></a><!-- doxytag: member="ost::CommandOption::OptionType" ref="b56f222627bb3843d2b055d42ceaa493" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">enum <a class="el" href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa493">ost::CommandOption::OptionType</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> OptionType is for denoting what type of option this is, with an arg, without an arg or the trailing args.Option type. <p> <dl compact><dt><b>Enumerator: </b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><em><a class="anchor" name="b56f222627bb3843d2b055d42ceaa49351afdccef3c1eefa378b4ea79872fb9f"></a><!-- doxytag: member="hasArg" ref="b56f222627bb3843d2b055d42ceaa49351afdccef3c1eefa378b4ea79872fb9f" args="" -->hasArg</em> </td><td> This option is associated with a value. </td></tr> <tr><td valign="top"><em><a class="anchor" name="b56f222627bb3843d2b055d42ceaa493206297cbdc29de03edfa0e24d589b227"></a><!-- doxytag: member="noArg" ref="b56f222627bb3843d2b055d42ceaa493206297cbdc29de03edfa0e24d589b227" args="" -->noArg</em> </td><td> This option is a flag only. </td></tr> <tr><td valign="top"><em><a class="anchor" name="b56f222627bb3843d2b055d42ceaa4934fbaf902c23f48a6d217585297f3afb5"></a><!-- doxytag: member="trailing" ref="b56f222627bb3843d2b055d42ceaa4934fbaf902c23f48a6d217585297f3afb5" args="" -->trailing</em> </td><td> Remaining of the command line arguments. </td></tr> <tr><td valign="top"><em><a class="anchor" name="b56f222627bb3843d2b055d42ceaa4939ebaee9fbe6ef1338347908f6e410095"></a><!-- doxytag: member="collect" ref="b56f222627bb3843d2b055d42ceaa4939ebaee9fbe6ef1338347908f6e410095" args="" -->collect</em> </td><td> Collect values that are not a value to an option. </td></tr> </table> </dl> </td> </tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="7e42ca61d049698df46daae73bb205bb"></a><!-- doxytag: member="ost::CommandOption::~CommandOption" ref="7e42ca61d049698df46daae73bb205bb" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual ost::CommandOption::~CommandOption </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> A virtual destructor just in case. <p> </td> </tr> </table> <a class="anchor" name="989bf900aed6323812ae6922edcdc4af"></a><!-- doxytag: member="ost::CommandOption::CommandOption" ref="989bf900aed6323812ae6922edcdc4af" args="(const char *inOptionName, const char *inOptionLetter, const char *inDescription, OptionType inOptionType, bool inRequired=false, CommandOption **ppNext=&defaultCommandOptionList)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">ost::CommandOption::CommandOption </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>inOptionName</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>inOptionLetter</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>inDescription</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa493">OptionType</a> </td> <td class="mdname" nowrap> <em>inOptionType</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>inRequired</em> = <code>false</code>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="classost_1_1_command_option.html">CommandOption</a> ** </td> <td class="mdname" nowrap> <em>ppNext</em> = <code>&<a class="el" href="namespaceost.html#3b701311bbf7cf16f954820e316f5766">defaultCommandOptionList</a></code></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <a class="el" href="classost_1_1_command_option.html">CommandOption</a> contructor. <p> Note the default values for required and ppNext.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>inOptionName</em> </td><td>long option name </td></tr> <tr><td valign="top"></td><td valign="top"><em>inOptionLetter</em> </td><td>short letter name </td></tr> <tr><td valign="top"></td><td valign="top"><em>inDescription</em> </td><td>short description of the option </td></tr> <tr><td valign="top"></td><td valign="top"><em>inOptionType</em> </td><td>the type of this option </td></tr> <tr><td valign="top"></td><td valign="top"><em>inRequired</em> </td><td>true if option is required </td></tr> <tr><td valign="top"></td><td valign="top"><em>ppNext</em> </td><td>the linked list header </td></tr> </table> </dl> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="c6597549063ded15f8d50d72e8cd9bf6"></a><!-- doxytag: member="ost::CommandOption::foundOption" ref="c6597549063ded15f8d50d72e8cd9bf6" args="(CommandOptionParse *cop, const char **value, int num)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual void ost::CommandOption::foundOption </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> * </td> <td class="mdname" nowrap> <em>cop</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const char ** </td> <td class="mdname" nowrap> <em>value</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>num</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> foundOption is called by the <a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> object during the parsing of the command line options. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>cop</em> </td><td>pointer to the command option parser </td></tr> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>an array of values of this option </td></tr> <tr><td valign="top"></td><td valign="top"><em>num</em> </td><td>number of values in the array </td></tr> </table> </dl> <p> Reimplemented in <a class="el" href="classost_1_1_command_option_with_arg.html#7e012538193acafda06b609dc1dee369">ost::CommandOptionWithArg</a>. </td> </tr> </table> <a class="anchor" name="70394fb2a025443e6890e0e076a94477"></a><!-- doxytag: member="ost::CommandOption::foundOption" ref="70394fb2a025443e6890e0e076a94477" args="(CommandOptionParse *cop, const char *value=0)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual void ost::CommandOption::foundOption </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> * </td> <td class="mdname" nowrap> <em>cop</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>value</em> = <code>0</code></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> foundOption is called by the <a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> object during the parsing of the command line options. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>cop</em> </td><td>pointer to the command option parser </td></tr> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>the value of this option </td></tr> </table> </dl> <p> Reimplemented in <a class="el" href="classost_1_1_command_option_with_arg.html#a7a9e87b68ef493f84688355062fc9a8">ost::CommandOptionWithArg</a>, and <a class="el" href="classost_1_1_command_option_no_arg.html#5762755aabab3298e9e9d2fe45f4de61">ost::CommandOptionNoArg</a>. </td> </tr> </table> <a class="anchor" name="cf1272321b17a2cbe953ce23ffa6a5e8"></a><!-- doxytag: member="ost::CommandOption::hasValue" ref="cf1272321b17a2cbe953ce23ffa6a5e8" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual bool ost::CommandOption::hasValue </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> For fields with the required flag set, this method is used to determine if the Option has satisfied it's required status. <p> The default methods simply returns true if any values have been found. This could be specialized to return true based on some other criteria. <p> Reimplemented in <a class="el" href="classost_1_1_command_option_with_arg.html#cf0c03d84b032dab059ae219922dadde">ost::CommandOptionWithArg</a>. </td> </tr> </table> <a class="anchor" name="1cc99afcc775ca21d16c38a0661839a2"></a><!-- doxytag: member="ost::CommandOption::parseDone" ref="1cc99afcc775ca21d16c38a0661839a2" args="(CommandOptionParse *cop)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual void ost::CommandOption::parseDone </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> * </td> <td class="mdname1" valign="top" nowrap> <em>cop</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Once parsing of command line options is complete, this method is called. <p> This can be used to perform last minute checks on the options collected.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>cop</em> </td><td>pointer to the command option parser </td></tr> </table> </dl> <dl compact><dt><b>Examples: </b></dt><dd> <a class="el" href="cmdlineopt_8cpp-example.html#a17">cmdlineopt.cpp</a>.</dl> </td> </tr> </table> <a class="anchor" name="f52fe62b7a0d3c40b726fa2447cb3b78"></a><!-- doxytag: member="ost::CommandOption::performTask" ref="f52fe62b7a0d3c40b726fa2447cb3b78" args="(CommandOptionParse *cop)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual void ost::CommandOption::performTask </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_command_option_parse.html">CommandOptionParse</a> * </td> <td class="mdname1" valign="top" nowrap> <em>cop</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Once <a class="el" href="classost_1_1_command_option.html">CommandOption</a> objects have completed parsing and there are no errors they may have some specific tasks to perform. <p> PerformTask must return.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>cop</em> </td><td>pointer to the command option parser </td></tr> </table> </dl> <dl compact><dt><b>Examples: </b></dt><dd> <a class="el" href="cmdlineopt_8cpp-example.html#a19">cmdlineopt.cpp</a>.</dl> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="e7c1ad2ef21198b1bef933847ff5d197"></a><!-- doxytag: member="ost::CommandOption::description" ref="e7c1ad2ef21198b1bef933847ff5d197" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const char* <a class="el" href="classost_1_1_command_option.html#e7c1ad2ef21198b1bef933847ff5d197">ost::CommandOption::description</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> A short description of the option for Usage messages. <p> e.g. Usage: mycommand : blah -f, --file <DESCRIPTION here> </td> </tr> </table> <a class="anchor" name="0dd94d805913bf11cd188de53baaf27c"></a><!-- doxytag: member="ost::CommandOption::next" ref="0dd94d805913bf11cd188de53baaf27c" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_command_option.html">CommandOption</a>* <a class="el" href="classost_1_1_command_option.html#0dd94d805913bf11cd188de53baaf27c">ost::CommandOption::next</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> This next <a class="el" href="classost_1_1_command_option.html">CommandOption</a> in this list of options or nil if no more options exist. <p> </td> </tr> </table> <a class="anchor" name="c894a27c5aeeb70ff07387bb721bd7c6"></a><!-- doxytag: member="ost::CommandOption::optionLetter" ref="c894a27c5aeeb70ff07387bb721bd7c6" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const char* <a class="el" href="classost_1_1_command_option.html#c894a27c5aeeb70ff07387bb721bd7c6">ost::CommandOption::optionLetter</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> option letter, these will be preceded with "-" on the command line. <p> e.g. -f foo.x </td> </tr> </table> <a class="anchor" name="3cf7d6f9d1943e981d29c38e2e188231"></a><!-- doxytag: member="ost::CommandOption::optionName" ref="3cf7d6f9d1943e981d29c38e2e188231" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const char* <a class="el" href="classost_1_1_command_option.html#3cf7d6f9d1943e981d29c38e2e188231">ost::CommandOption::optionName</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Long option name, these will be preceded with "--" on the command line. <p> e.g. --file foo.x </td> </tr> </table> <a class="anchor" name="2e5f9f895bda7cf7dbe48e0106866368"></a><!-- doxytag: member="ost::CommandOption::optionType" ref="2e5f9f895bda7cf7dbe48e0106866368" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_command_option.html#b56f222627bb3843d2b055d42ceaa493">OptionType</a> <a class="el" href="classost_1_1_command_option.html#2e5f9f895bda7cf7dbe48e0106866368">ost::CommandOption::optionType</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> This command option's OptionType. <p> </td> </tr> </table> <a class="anchor" name="05f8b1439cbf0cf33f47707a33baad57"></a><!-- doxytag: member="ost::CommandOption::required" ref="05f8b1439cbf0cf33f47707a33baad57" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">bool <a class="el" href="classost_1_1_command_option.html#05f8b1439cbf0cf33f47707a33baad57">ost::CommandOption::required</a> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> True if this parameter is required. <p> If the parameter is not supplied and required is true, an error will be flagged in the option processor. </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="cmdoptns_8h-source.html">cmdoptns.h</a></ul> <hr size="1"><address style="align: right;"><small>Generated on Mon Jun 19 10:50:56 2006 for GNU CommonC++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address> </body> </html>