mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-11 21:24:53 -04:00
more updates
This commit is contained in:
parent
bed8c016b5
commit
9a36a7d26f
@ -87,18 +87,18 @@ Descriptions</a></li>
|
||||
<a name="BASIC_USAGE" id="BASIC_USAGE"></a>
|
||||
<h2>Basic Usage</h2>
|
||||
There are a few key classes to be aware of. The first is the
|
||||
<b>CmdLine</b> (command line) class. This is the class that parses
|
||||
<b>CmdLine</b> (command line) class. This class parses
|
||||
the command line passed to it according to the arguments that it
|
||||
contains. Arguments are separate objects that are added to the
|
||||
<b>CmdLine</b> object one at a time. There are five types of
|
||||
arguments, <b>ValueArg</b>, <b>UnlabeledValueArg</b>,
|
||||
<b>CmdLine</b> object one at a time. The five types of
|
||||
arguments are, <b>ValueArg</b>, <b>UnlabeledValueArg</b>,
|
||||
<b>SwitchArg</b>, <b>MultiArg</b> and <b>UnlabeledMultiArg</b>.
|
||||
These are templatized classes meaning they can be defined to parse
|
||||
a value of any <a href="manual.html#FOOTNOTES">type**</a>. Once the
|
||||
arguments are added to the command line object, the command line is
|
||||
parsed which assigns the data on the command line to the specific
|
||||
argument objects. The values are accessed by calls to the
|
||||
<i>getValue()</i> methods of the argument objects.<br />
|
||||
These classes are templatized, which means they can be defined to parse
|
||||
a value of any <a href="manual.html#FOOTNOTES">type**</a>. Once you add the
|
||||
arguments to the <b>CmdLine</b> object, it parses the command line
|
||||
and assigns the data it finds to the specific argument objects it
|
||||
contains. Your program accesses the values parsed by
|
||||
calls to the <i>getValue()</i> methods of the argument objects.<br />
|
||||
<br />
|
||||
Here is a simple <a href="test1.cpp">example</a> ...<br />
|
||||
<pre>
|
||||
|
Loading…
x
Reference in New Issue
Block a user