Class for a boolean command line parameters.
More...
|
Static Public Member Functions inherited from Burger::CommandParameter |
static int | RemoveParms (int argc, const char **argv, int iIndexToArgv, int iRemoveCount) noexcept |
| Remove entries from a "C" command list.
|
|
static int | Process (int argc, const char **argv, const CommandParameter **ppParms, uintptr_t uParmCount, const char *pUsage=nullptr, int iMin=0, int iMax=0) noexcept |
| Process an array of command parameters.
|
|
Static Public Attributes inherited from Burger::CommandParameter |
static const Burger::StaticRTTI | g_StaticRTTI |
| The global description of the class.
|
|
static const Burger::StaticRTTI | g_StaticRTTI |
| The global description of the class.
|
|
Protected Member Functions inherited from Burger::CommandParameter |
| CommandParameter (const char *pHelp, const char *const *ppParameterNames, uintptr_t uParameterCount) noexcept |
| Base class constructor.
|
|
Protected Attributes inherited from Burger::CommandParameter |
const char * | m_pHelp |
| Pointer to the optional help string.
|
|
const char *const * | m_ppParameterNames |
| Array of "C" strings of the -parameter (Minus the -)
|
|
uintptr_t | m_uParameterCount |
| Number of possible strings to check.
|
|
Class for a boolean command line parameters.
Sets a flag to true if this command was present
- See also
- Burger::CommandParameter or Burger::CommandParameterWordPtr
◆ CommandParameterBooleanTrue() [1/2]
Burger::CommandParameterBooleanTrue::CommandParameterBooleanTrue |
( |
const char * | pHelp, |
|
|
const char *const * | ppParameterName, |
|
|
uintptr_t | uParameterCount ) |
|
inlinenoexcept |
Constructor for multiple valid commands.
In cases there multiple commands can trigger this command, pass a pointer to an array of "C" strings and the array size in entries to construct this parameter parser
- Note
- Do not set the count to 0, it will cause this class to treat the array pointer as a direct pointer which may not be desired behavior
- Parameters
-
pHelp | Pointer to "C" string for usage |
ppParameterName | Pointer to an array of "C" strings for valid inputs |
uParameterCount | Number of entries in the array (1-XX). |
◆ CommandParameterBooleanTrue() [2/2]
Burger::CommandParameterBooleanTrue::CommandParameterBooleanTrue |
( |
const char * | pHelp, |
|
|
const char * | pParameterName ) |
|
inlinenoexcept |
Constructor for a single valid command.
The default value is set to FALSE.
- Parameters
-
pHelp | Pointer to "C" string for usage. |
pParameterName | Pointer to a "C" string to match to trigger this parameter. |
◆ Action()
int Burger::CommandParameterBooleanTrue::Action |
( |
int | argc, |
|
|
const char ** | argv ) |
|
overridevirtualnoexcept |
Sets the value to TRUE.
No parameters are parsed.
- Parameters
-
argc | Number of parameters in argv (Not used) |
argv | Array of "C" strings (Not used) |
- Returns
- Returns 1
Implements Burger::CommandParameter.
◆ GetValue()
uint_t Burger::CommandParameterBooleanTrue::GetValue |
( |
void | | ) |
const |
|
inlinenoexcept |
Returns the boolean value.
Returns the contained boolean of TRUE or FALSE
- Returns
- Returns TRUE or FALSE
◆ m_bValue
uint_t Burger::CommandParameterBooleanTrue::m_bValue |
|
private |