OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022

#include <argpar.h>

Collaboration diagram for argpar_state:
[legend]

Public Attributes

struct argparargpar
 
unsigned argc
 
char ** argv
 
unsigned next
 
unsigned int flags
 
unsigned arg_num
 
unsigned quoted
 
void * input
 
void ** child_inputs
 
void * hook
 
const char * parfile
 
char * name
 
const char * arg_name
 
const char * arg_alias
 
const char * arg_value
 
long argv_as_int
 
int argv_as_int_err
 
double argv_as_dbl
 
int argv_as_dbl_err
 

Detailed Description

State variable to be filled before each call to the parser callback.

Definition at line 196 of file argpar.h.

Member Data Documentation

◆ arg_alias

const char* arg_alias

key part of key=value pair.

Definition at line 240 of file argpar.h.

◆ arg_name

const char* arg_name

key part of key=value pair. When an alias is used, this is the name of the actual option, not the alias.

Definition at line 237 of file argpar.h.

◆ arg_num

unsigned arg_num

The number of key arguments processed so far.

Definition at line 212 of file argpar.h.

◆ arg_value

const char* arg_value

value part of key=value pair.

Definition at line 243 of file argpar.h.

◆ argc

unsigned argc

Total number of arguments being parsed by a call of argpar_parse_args.

Definition at line 201 of file argpar.h.

◆ argpar

struct argpar* argpar

Pointer to the parent argpar object.

Definition at line 198 of file argpar.h.

◆ argv

char** argv

Pointer to arguments passed to argpar_parse_args.

Definition at line 203 of file argpar.h.

◆ argv_as_dbl

double argv_as_dbl

value part of key=value pair, parsed as a double, if OPTION_DBL was used.

Definition at line 251 of file argpar.h.

◆ argv_as_dbl_err

int argv_as_dbl_err

Error state of double casting, if OPTION_DBL was used; 1 otherwise.

Definition at line 253 of file argpar.h.

◆ argv_as_int

long argv_as_int

value part of key=value pair, parsed as a long, if OPTION_INT was used.

Definition at line 246 of file argpar.h.

◆ argv_as_int_err

int argv_as_int_err

Error state of integer casting, if OPTION_INT was used; 1 otherwise.

Definition at line 248 of file argpar.h.

◆ child_inputs

void** child_inputs

Values to pass to child parsers, same length as the number of child parsers for the current parser.

Definition at line 222 of file argpar.h.

◆ flags

unsigned int flags

Flags passed to parser functions to modify the behavior.

Definition at line 209 of file argpar.h.

◆ hook

void* hook

For the parser's use. Initialized to NULL.

Definition at line 225 of file argpar.h.

◆ input

void* input

Arbitrary pointer given by the user, generally to store parsed arguments.

Definition at line 218 of file argpar.h.

◆ name

char* name

The name used when printing messages. This is initialized to ARGV[0], or PROGRAM_INVOCATION_NAME if that is unavailable.

Definition at line 233 of file argpar.h.

◆ next

unsigned next

The index in ARGV of the next arg that to be parsed. May be modified.

Definition at line 206 of file argpar.h.

◆ parfile

const char* parfile

The name of the parfile being parsed, or NULL if the argument comes from the command line.

Definition at line 229 of file argpar.h.

◆ quoted

unsigned quoted

The index of the first argument after –, if found.

Definition at line 215 of file argpar.h.


The documentation for this struct was generated from the following file:
  • /gfs-oceanweb/web/ocssw/ocssw_src/oel_util/libgenutils/argpar.h