Command line argument iterator.
More...
#include <IDL_FrontEnd.h>
|
const char * | arg () const noexcept |
|
bool | end () const noexcept |
|
bool | next () noexcept |
| Advances to the next argument. More...
|
|
const char * | parameter (const char *switch_end) |
| Get the parameter followed to the switch. More...
|
|
| CmdLine (int argc, const char *const argv[]) |
|
Command line argument iterator.
Definition at line 116 of file IDL_FrontEnd.h.
◆ CmdLine()
IDL_FrontEnd::CmdLine::CmdLine |
( |
int |
argc, |
|
|
const char *const |
argv[] |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
argc | Argument count. |
argv | Argument array. |
Definition at line 151 of file IDL_FrontEnd.h.
◆ arg()
const char* IDL_FrontEnd::CmdLine::arg |
( |
| ) |
const |
|
inlinenoexcept |
◆ end()
bool IDL_FrontEnd::CmdLine::end |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
false
if there are no more arguments.
Definition at line 127 of file IDL_FrontEnd.h.
◆ next()
bool IDL_FrontEnd::CmdLine::next |
( |
| ) |
|
|
noexcept |
Advances to the next argument.
- Returns
true
on success, false
if no more arguments.
◆ parameter()
const char* IDL_FrontEnd::CmdLine::parameter |
( |
const char * |
switch_end | ) |
|
Get the parameter followed to the switch.
The command line parameter may follow the switch immediately (-DMYDEFINE) or as the next argument (-D MYDEFINE). The parameter must not start from '-'.
- Parameters
-
switch_end | Pointer to the character immediately after the switch. |
- Returns
- The parameter string.
- Exceptions
-
std::invalid_argument | if the parameter is missing. |
The documentation for this class was generated from the following file: