Cthulhu  0.2.10
Cthulhu compiler collection
argparse.h File Reference
#include <ctu_argparse_api.h>
#include "core/compiler.h"
#include <stdbool.h>
#include <stddef.h>
Include dependency graph for argparse.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef typedefCT_BEGIN_API struct node_t node_t
 
typedef bool(* ap_event_t) (ap_t *ap, const cfg_field_t *param, const void *value, void *data)
 callback for a parameter event called when a parameter is parsed return true to indicate the event was handled, false to continue to the next handler More...
 

Functions

CT_ARGPARSE_API ap_tap_new (cfg_group_t *config, arena_t *arena)
 create a new parser instance More...
 
CT_ARGPARSE_API void ap_update (ap_t *self)
 update the parser with the latest config More...
 
CT_ARGPARSE_API void ap_event (ap_t *self, const cfg_field_t *param, ap_event_t callback, void *data)
 add a callback event to a parameter More...
 
CT_ARGPARSE_API int ap_parse_args (ap_t *self, int argc, const char **argv)
 parse a command line More...
 
CT_ARGPARSE_API int ap_parse (ap_t *self, const char *str)
 parse a string More...
 
CT_ARGPARSE_API vector_tap_get_posargs (ap_t *self)
 get all positional arguments More...
 
CT_ARGPARSE_API vector_tap_get_unknown (ap_t *self)
 get all unknown arguments More...
 
CT_ARGPARSE_API vector_tap_get_errors (ap_t *self)
 get all errors More...
 
CT_ARGPARSE_API size_t ap_count_params (ap_t *self)
 get the number of processed arguments More...
 

Typedef Documentation

◆ node_t

typedef typedefCT_BEGIN_API struct node_t node_t

Definition at line 12 of file argparse.h.