libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Data Structures | |
union | GblOptionPtr |
struct | GblOption |
struct | GblOptionGroupClass |
struct | GblOptionGroup |
Macros | |
Type System | |
Type UUID and cast operators | |
#define | GBL_OPTION_GROUP_TYPE |
#define | GBL_OPTION_GROUP(self) |
#define | GBL_OPTION_GROUP_CLASS(klass) |
#define | GBL_OPTION_GROUP_GET_CLASS(self) |
Typedefs | |
typedef GBL_RESULT(* | GblOptionCallbackFn) (GblOptionGroup *pGroup, const GblOption *pOption, GblStringView value, GblBool *pConsumed) |
typedef GblFlags | GBL_OPTION_FLAGS |
typedef GblEnum | GBL_OPTION_TYPE |
Enumerations | |
enum | GBL_OPTION_FLAGS |
enum | GBL_OPTION_TYPE |
Functions | |
GblType | GblOptionGroup_type (void) |
GblOptionGroup * | GblOptionGroup_create (const char *pName, const char *pPrefix, const GblOption *pOptions) |
GblRefCount | GblOptionGroup_unref (GblOptionGroup *pSelf) |
GBL_RESULT | GblOptionGroup_parse (GblOptionGroup *pSelf, GblStringList *pList, GblBool prefixOnly) |
Grouping of parsable command-line options.
This file contains the GblOptionGroup type and its associated API. It is used to create a standalone group of options that correspond to a single module or unit of code which can be added and parsed off of a larger, application-wide group of options.
Definition in file gimbal_option_group.h.
#define GBL_OPTION_GROUP_TYPE |
Type UUID for GblOptionGroup.
Definition at line 26 of file gimbal_option_group.h.
#define GBL_OPTION_GROUP | ( | self | ) |
Casts a GblInstance to GblOptionGroup.
Definition at line 27 of file gimbal_option_group.h.
#define GBL_OPTION_GROUP_CLASS | ( | klass | ) |
Casts a GblClass to GblOptionGroupClass.
Definition at line 28 of file gimbal_option_group.h.
#define GBL_OPTION_GROUP_GET_CLASS | ( | self | ) |
Gets a GblOptionGroupClass from a GblInstance.
Definition at line 29 of file gimbal_option_group.h.
typedef GBL_RESULT(* GblOptionCallbackFn) (GblOptionGroup *pGroup, const GblOption *pOption, GblStringView value, GblBool *pConsumed) |
Callback function signature to be used with a GBL_OPTION_TYPE_CALLBACK GblOption.
Definition at line 40 of file gimbal_option_group.h.
typedef GblFlags GBL_OPTION_FLAGS |
Definition at line 48 of file gimbal_option_group.h.
typedef GblEnum GBL_OPTION_TYPE |
Definition at line 58 of file gimbal_option_group.h.
enum GBL_OPTION_FLAGS |
GblOption flags for controlling special option behaviors.
Definition at line 48 of file gimbal_option_group.h.
enum GBL_OPTION_TYPE |
Represents the list of every supported type of GblOption value.
Definition at line 58 of file gimbal_option_group.h.
GblType GblOptionGroup_type | ( | void | ) |
Returns the GblType UUID associated with GblOptionGroup.
GblOptionGroup * GblOptionGroup_create | ( | const char * | pName, |
const char * | pPrefix, | ||
const GblOption * | pOptions | ||
) |
Creates a GblOptionGroup with an option name, prefix, and NULL-terminated option list.
GblRefCount GblOptionGroup_unref | ( | GblOptionGroup * | pSelf | ) |
Decrements the reference counter of the given GblOptionGroup by 1, destructing when it hits 0.
GBL_RESULT GblOptionGroup_parse | ( | GblOptionGroup * | pSelf, |
GblStringList * | pList, | ||
GblBool | prefixOnly | ||
) |
Processes the given string list, optionally requiring prefixes on all options.