Command-line option an OptionProcessor matches.
More...
#include <option.h>
|
| | Option (const char *pszName) |
| | Construct an option of a name.
|
| virtual | ~Option () |
| | Release the option.
|
| virtual void | Parse (int *pnIndex)=0 |
| | Read the value that follows the option on the command line.
|
| virtual void | PrintUsage () const =0 |
| | Print the option's usage line.
|
| bool | Match (int *pnIndex) const |
| | Report whether the argument at an index names this option, and step past it when it does.
|
| | Option (const char *name) |
| | Create an option.
|
| virtual | ~Option () |
| | Release the option.
|
| virtual void | Set (int &curArg)=0 |
| | Apply the option, consuming any value arguments after it.
|
| virtual void | PrintUsage ()=0 |
| | Print the option's usage line.
|
| bool | Matches (int &curArg) |
| | Consume the current argument when it names this option.
|
Command-line option an OptionProcessor matches.
Command-line option that OptionProcessor matches by name.
The RTTI includes the class name and records no base. BoolOption and StringOption derive from it. The name is at +0x00 and the vptr at +0x04.
The RTTI includes the class name. The object is 8 bytes.
◆ Option() [1/2]
| Option::Option |
( |
const char * | pszName | ) |
|
|
explicit |
Construct an option of a name.
- Parameters
-
| pszName | The name, without the leading -. |
- Ghidra address:
- NTSC-U/C: 0x0029d918
- Ghidra address:
- PAL: 0x002a75e0
◆ ~Option() [1/2]
| virtual Option::~Option |
( |
| ) |
|
|
inlinevirtual |
Release the option.
- Ghidra address:
- NTSC-U/C: 0x003ab520
- Ghidra address:
- PAL: 0x0041a280
◆ Option() [2/2]
| Option::Option |
( |
const char * | name | ) |
|
|
explicit |
Create an option.
- Parameters
-
| name | The option's name, matched after the leading dash of an argument. |
- Ghidra address:
- 0x10013260
◆ ~Option() [2/2]
| virtual Option::~Option |
( |
| ) |
|
|
virtual |
Release the option.
- Ghidra address:
- 0x100132f0
◆ Parse()
| virtual void Option::Parse |
( |
int * | pnIndex | ) |
|
|
pure virtual |
Read the value that follows the option on the command line.
- Parameters
-
| pnIndex | The index of the next argument, advanced past what the option reads. |
Implemented in BoolOption, and StringOption.
◆ PrintUsage() [1/2]
| virtual void Option::PrintUsage |
( |
| ) |
const |
|
pure virtual |
◆ Match()
| bool Option::Match |
( |
int * | pnIndex | ) |
const |
Report whether the argument at an index names this option, and step past it when it does.
- Parameters
-
| pnIndex | The index of the argument. |
- Returns
- Whether the argument names the option.
- Ghidra address:
- NTSC-U/C: 0x0029d9e0
- Ghidra address:
- PAL: 0x002a76a8
◆ Set()
| virtual void Option::Set |
( |
int & | curArg | ) |
|
|
pure virtual |
Apply the option, consuming any value arguments after it.
- Parameters
-
| curArg | The index of the next argument. |
Implemented in BoolOption, and StringOption.
◆ PrintUsage() [2/2]
| virtual void Option::PrintUsage |
( |
| ) |
|
|
pure virtual |
◆ Matches()
| bool Option::Matches |
( |
int & | curArg | ) |
|
Consume the current argument when it names this option.
- Parameters
-
| curArg | The index of the current argument, advanced past it on a match. |
- Returns
- Whether the argument names this option.
- Ghidra address:
- 0x10013360
◆ mName
| const char * Option::mName |
|
protected |
The name, without the leading -.
The option's name.
The documentation for this class was generated from the following files: