Blender
V3.3
|
A general argument parsing module. More...
Go to the source code of this file.
Typedefs | |
typedef struct bArgs | bArgs |
typedef int(* | BA_ArgCallback) (int argc, const char **argv, void *data) |
Functions | |
struct bArgs * | BLI_args_create (int argc, const char **argv) |
void | BLI_args_destroy (struct bArgs *ba) |
void | BLI_args_pass_set (struct bArgs *ba, int current_pass) |
void | BLI_args_add (struct bArgs *ba, const char *short_arg, const char *long_arg, const char *doc, BA_ArgCallback cb, void *data) |
void | BLI_args_add_case (struct bArgs *ba, const char *short_arg, int short_case, const char *long_arg, int long_case, const char *doc, BA_ArgCallback cb, void *data) |
void | BLI_args_parse (struct bArgs *ba, int pass, BA_ArgCallback default_cb, void *data) |
void | BLI_args_print_arg_doc (struct bArgs *ba, const char *arg) |
void | BLI_args_print_other_doc (struct bArgs *ba) |
bool | BLI_args_has_other_doc (const struct bArgs *ba) |
void | BLI_args_print (struct bArgs *ba) |
A general argument parsing module.
Definition in file BLI_args.h.
Returns the number of extra arguments consumed by the function.
Definition at line 23 of file BLI_args.h.
Definition at line 1 of file BLI_args.h.
void BLI_args_add | ( | struct bArgs * | ba, |
const char * | short_arg, | ||
const char * | long_arg, | ||
const char * | doc, | ||
BA_ArgCallback | cb, | ||
void * | data | ||
) |
Pass starts at 1, -1 means valid all the time short_arg or long_arg can be null to specify no short or long versions
Definition at line 214 of file BLI_args.c.
References BLI_args_add_case(), and data.
Referenced by main_args_setup().
void BLI_args_add_case | ( | struct bArgs * | ba, |
const char * | short_arg, | ||
int | short_case, | ||
const char * | long_arg, | ||
int | long_case, | ||
const char * | doc, | ||
BA_ArgCallback | cb, | ||
void * | data | ||
) |
Short_case and long_case specify if those arguments are case specific
Definition at line 194 of file BLI_args.c.
References data, internalAdd(), and internalDocs().
Referenced by BLI_args_add(), and main_args_setup().
struct bArgs* BLI_args_create | ( | int | argc, |
const char ** | argv | ||
) |
Definition at line 99 of file BLI_args.c.
References bArgs::argc, bArgs::argv, BLI_ghash_new(), BLI_listbase_clear(), bArgs::current_pass, bArgs::docs, bArgs::items, keycmp(), keyhash(), MEM_callocN, and bArgs::passes.
Referenced by main().
Definition at line 114 of file BLI_args.c.
References BLI_freelistN(), BLI_ghash_free(), bArgs::docs, bArgs::items, MEM_freeN, and bArgs::passes.
Referenced by callback_main_atexit().
Definition at line 263 of file BLI_args.c.
References bArgs::docs, and ListBase::first.
Referenced by arg_handle_print_help().
void BLI_args_parse | ( | struct bArgs * | ba, |
int | pass, | ||
BA_ArgCallback | default_cb, | ||
void * | data | ||
) |
Definition at line 273 of file BLI_args.c.
References Freestyle::a, bArgs::argc, bArgs::argv, BLI_assert, data, lookUp(), NULL, and bArgs::passes.
Referenced by main(), and main_args_setup_post().
The pass to use for BLI_args_add.
Definition at line 122 of file BLI_args.c.
References BLI_assert, and bArgs::current_pass.
Referenced by main_args_setup().
Definition at line 128 of file BLI_args.c.
References bArgs::argc, and bArgs::argv.
Referenced by arg_handle_debug_mode_set().
Definition at line 239 of file BLI_args.c.
References Freestyle::a, internalDocPrint(), and lookUp().
Referenced by arg_handle_print_help().
Definition at line 252 of file BLI_args.c.
References bArgs::docs, ListBase::first, and internalDocPrint().
Referenced by arg_handle_print_help().