Blender  V3.3
BLI_args.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
4 #pragma once
5 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 struct bArgs;
16 typedef struct bArgs bArgs;
17 
23 typedef int (*BA_ArgCallback)(int argc, const char **argv, void *data);
24 
25 struct bArgs *BLI_args_create(int argc, const char **argv);
26 void BLI_args_destroy(struct bArgs *ba);
27 
29 void BLI_args_pass_set(struct bArgs *ba, int current_pass);
30 
35 void BLI_args_add(struct bArgs *ba,
36  const char *short_arg,
37  const char *long_arg,
38  const char *doc,
39  BA_ArgCallback cb,
40  void *data);
41 
45 void BLI_args_add_case(struct bArgs *ba,
46  const char *short_arg,
47  int short_case,
48  const char *long_arg,
49  int long_case,
50  const char *doc,
51  BA_ArgCallback cb,
52  void *data);
53 
54 void BLI_args_parse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void *data);
55 
56 void BLI_args_print_arg_doc(struct bArgs *ba, const char *arg);
57 void BLI_args_print_other_doc(struct bArgs *ba);
58 
59 bool BLI_args_has_other_doc(const struct bArgs *ba);
60 
61 void BLI_args_print(struct bArgs *ba);
62 
63 #ifdef __cplusplus
64 }
65 #endif
void BLI_args_parse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void *data)
Definition: BLI_args.c:273
void BLI_args_print(struct bArgs *ba)
Definition: BLI_args.c:128
void BLI_args_destroy(struct bArgs *ba)
Definition: BLI_args.c:114
void BLI_args_print_other_doc(struct bArgs *ba)
Definition: BLI_args.c:252
void BLI_args_print_arg_doc(struct bArgs *ba, const char *arg)
Definition: BLI_args.c:239
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)
Definition: BLI_args.c:194
void BLI_args_pass_set(struct bArgs *ba, int current_pass)
Definition: BLI_args.c:122
void BLI_args_add(struct bArgs *ba, const char *short_arg, const char *long_arg, const char *doc, BA_ArgCallback cb, void *data)
Definition: BLI_args.c:214
struct bArgs * BLI_args_create(int argc, const char **argv)
Definition: BLI_args.c:99
bool BLI_args_has_other_doc(const struct bArgs *ba)
Definition: BLI_args.c:263
int(* BA_ArgCallback)(int argc, const char **argv, void *data)
Definition: BLI_args.h:23
Definition: BLI_args.c:45
int current_pass
Definition: BLI_args.c:53
const char ** argv
Definition: BLI_args.c:49
int argc
Definition: BLI_args.c:48