Blender V2.61 - r43446
Typedefs | Functions

BLI_args.h File Reference

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 bArgsBLI_argsInit (int argc, const char **argv)
void BLI_argsFree (struct bArgs *ba)
void BLI_argsAdd (struct bArgs *ba, int pass, const char *short_arg, const char *long_arg, const char *doc, BA_ArgCallback cb, void *data)
void BLI_argsAddCase (struct bArgs *ba, int pass, const char *short_arg, int short_case, const char *long_arg, int long_case, const char *doc, BA_ArgCallback cb, void *data)
void BLI_argsParse (struct bArgs *ba, int pass, BA_ArgCallback default_cb, void *data)
void BLI_argsPrintArgDoc (struct bArgs *ba, const char *arg)
void BLI_argsPrintOtherDoc (struct bArgs *ba)
void BLI_argsPrint (struct bArgs *ba)
const char ** BLI_argsArgv (struct bArgs *ba)

Detailed Description

A general argument parsing module.

Definition in file BLI_args.h.


Typedef Documentation

typedef int(* BA_ArgCallback)(int argc, const char **argv, void *data)

Definition at line 40 of file BLI_args.h.

typedef struct bArgs bArgs

Definition at line 37 of file BLI_args.h.


Function Documentation

void BLI_argsAdd ( struct bArgs ba,
int  pass,
const char *  short_arg,
const char *  long_arg,
const char *  doc,
BA_ArgCallback  cb,
void *  data 
)

Definition at line 219 of file BLI_args.c.

References BLI_argsAddCase().

Referenced by setupArguments().

void BLI_argsAddCase ( struct bArgs ba,
int  pass,
const char *  short_arg,
int  short_case,
const char *  long_arg,
int  long_case,
const char *  doc,
BA_ArgCallback  cb,
void *  data 
)

Definition at line 206 of file BLI_args.c.

References simple_enum_gen::d, internalAdd(), and internalDocs().

Referenced by BLI_argsAdd(), and setupArguments().

const char** BLI_argsArgv ( struct bArgs ba)

Definition at line 155 of file BLI_args.c.

References bArgs::argv.

void BLI_argsFree ( struct bArgs ba)

Definition at line 139 of file BLI_args.c.

References BLI_freelistN(), BLI_ghash_free(), bArgs::docs, freeItem(), bArgs::items, MEM_freeN(), and bArgs::passes.

Referenced by main().

struct bArgs* BLI_argsInit ( int  argc,
const char **  argv 
) [read]
void BLI_argsParse ( struct bArgs ba,
int  pass,
BA_ArgCallback  default_cb,
void *  data 
)

Definition at line 263 of file BLI_args.c.

References bArgs::argc, bArgs::argv, data, bArgument::data, bArgument::func, i, bArgument::key, lookUp(), NULL, bAKey::pass, and bArgs::passes.

Referenced by main().

void BLI_argsPrint ( struct bArgs ba)

Definition at line 147 of file BLI_args.c.

References bArgs::argc, bArgs::argv, and i.

Referenced by debug_mode().

void BLI_argsPrintArgDoc ( struct bArgs ba,
const char *  arg 
)

Definition at line 236 of file BLI_args.c.

References simple_enum_gen::d, bArgument::doc, bArgDoc::done, internalDocPrint(), and lookUp().

Referenced by print_help().

void BLI_argsPrintOtherDoc ( struct bArgs ba)