#include <Option.h>
Inheritance diagram for rs::cmdline::CmdLineArgument:


Public Methods | |
| CmdLineArgument (const char *name_, const char *helptext_, const char *value_=0, bool is_real_arg=true) | |
| Declare a new command line argument. More... | |
| virtual | ~CmdLineArgument () |
| bool | value_is_set () const |
| operator bool () const | |
| Test the argument. More... | |
| virtual bool | reallyUsed () const |
| Test the argument. More... | |
| virtual std::string | get () |
| Get the argument value. More... | |
| virtual int | getNumeric () |
| Get the argument value as numeric value (accepts decimal and hexadecimal arguments). More... | |
| virtual double | getDouble () |
| Get the argument value as floating point value. More... | |
| virtual void | set (std::string value_, bool set_default_value=false) |
| Set the argument value manually. More... | |
| void | clear () |
| Clear the argument manually. More... | |
| virtual std::string | get_name () const |
| Return name of argument (as shown in helptext: i.e. "<arg>" ). More... | |
Protected Methods | |
| bool | has_default () const |
| void | set_has_default () |
| virtual std::string | get_helptext () const |
| Get the helptext. More... | |
Private Attributes | |
| std::string | name |
| std::string | value |
| bool | has_default_value |
| bool | really_used |
Friends | |
| class | ProgramInfo |
Definition at line 109 of file Option.h.
|
||||||||||||||||||||
|
Declare a new command line argument. Should be declared global.
Definition at line 267 of file Option.cpp. |
|
|
Definition at line 298 of file Option.cpp. |
|
|
|
|
|
Test the argument.
|
|
|
Test the argument.
Reimplemented in CmdLineArgumentOption, and RepeatedCmdLineArgumentOption. |
|
|
Get the argument value.
Reimplemented in RepeatableCmdLineArgument, and RepeatedCmdLineArgumentOption. Definition at line 141 of file Option.h. Referenced by CmdLineArgument::getDouble(), CmdLineArgument::getNumeric(), and FileFilter::init(). |
|
|
Get the argument value as numeric value (accepts decimal and hexadecimal arguments).
Definition at line 192 of file Option.cpp. |
|
|
Get the argument value as floating point value.
Definition at line 229 of file Option.cpp. |
|
||||||||||||
|
Set the argument value manually.
Reimplemented in RepeatableCmdLineArgument, CmdLineArgumentOption, and RepeatedCmdLineArgumentOption. |
|
|
Clear the argument manually.
Reimplemented in CmdLineArgumentOption, and RepeatedCmdLineArgumentOption. |
|
|
Return name of argument (as shown in helptext: i.e. "<arg>" ).
Reimplemented in RepeatableCmdLineArgument, and RepeatedCmdLineArgumentOption. Definition at line 169 of file Option.h. Referenced by CmdLineArgument::CmdLineArgument(), CmdLineArgumentOption::CmdLineArgumentOption(), ProgramInfo::init(), and CmdLineArgumentOption::print(). |
|
|
|
|
|
Definition at line 175 of file Option.h. Referenced by ProgramInfo::init(). |
|
|
Get the helptext.
Reimplemented from CmdLineHelpText. |
|
|
Reimplemented in RepeatableCmdLineArgument. |
|
|
Definition at line 110 of file Option.h. Referenced by CmdLineArgument::getDouble(), and CmdLineArgument::getNumeric(). |
|
|
|
|
|
|
|
|
|
|
Contact me in case of errors or questions. This documentation is powered by |
(C) 2000-2002 |