|
libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Data Structures | |
| struct | GblCmdArg |
| struct | GblCmdParserClass |
| struct | GblCmdParser |
Macros | |
Type System | |
Type UUID and cast operators | |
| #define | GBL_CMD_PARSER_TYPE |
| #define | GBL_CMD_PARSER(self) |
| #define | GBL_CMD_PARSER_CLASS(klass) |
| #define | GBL_CMD_PARSER_GET_CLASS(self) |
Functions | |
| GblType | GblCmdParser_type (void) |
Lifetime Management | |
Methods for controlling lifetime of a GblCmdParser | |
| GblCmdParser * | GblCmdParser_create (void) |
| GblRefCount | GblCmdParser_unref (GblCmdParser *pSelf) |
Parsing | |
Methods for parsing arguments or managing parsed values | |
| GblStringRef * | GblCmdParser_executable (const GblCmdParser *pSelf) |
| const GblStringList * | GblCmdParser_unknownOptions (const GblCmdParser *pSelf) |
| GBL_RESULT | GblCmdParser_parse (GblCmdParser *pSelf, GblStringList *pArgs) |
Modular command-line argument parser.
Definition in file gimbal_cmd_parser.h.
| #define GBL_CMD_PARSER_TYPE |
Type UUID of GblCmdParser.
Definition at line 23 of file gimbal_cmd_parser.h.
| #define GBL_CMD_PARSER | ( | self | ) |
Function-style GblInstance cast.
Definition at line 24 of file gimbal_cmd_parser.h.
| #define GBL_CMD_PARSER_CLASS | ( | klass | ) |
Function-style GblClass cast.
Definition at line 25 of file gimbal_cmd_parser.h.
| #define GBL_CMD_PARSER_GET_CLASS | ( | self | ) |
Get a GblCmdParserClass from GblInstance.
Definition at line 26 of file gimbal_cmd_parser.h.
| GblType GblCmdParser_type | ( | void | ) |
Returns the GblType UUID associated with GblCmdParser.
| GblCmdParser * GblCmdParser_create | ( | void | ) |
Creates a GblCmdParser object, initializes it, and returns a pointer to it.
| GblRefCount GblCmdParser_unref | ( | GblCmdParser * | pSelf | ) |
Unreferences a GblCmdParser, destroying it if it's the last one, returning the remaining reference count.
| GblStringRef * GblCmdParser_executable | ( | const GblCmdParser * | pSelf | ) |
After parsing, returns a GblStringRef to the name of the current executable (first positional argument)
| const GblStringList * GblCmdParser_unknownOptions | ( | const GblCmdParser * | pSelf | ) |
After parsing, retuns a GblStringList to the internally maintained list of unknown command-line options.
| GBL_RESULT GblCmdParser_parse | ( | GblCmdParser * | pSelf, |
| GblStringList * | pArgs ) |
Parses the list of arguments given by pArgs, populating internal structures, and returning the result.