Public Attributes
option Struct Reference

#include <options.h>

List of all members.

Public Attributes

struct option_alternativealternative
const char * desc
const char * name
int * set_pointer
enum option_type type
void * value_pointer

Detailed Description

Definition at line 49 of file options.h.


Member Data Documentation

used only for OPTION_ALTERNATIVE

Definition at line 77 of file options.h.

const char* option::desc

Definition at line 52 of file options.h.

const char* option::name

Name of the option (or 0 if this is the last element).

Definition at line 51 of file options.h.

If not NULL, it is set to 1 if the option is found.

Definition at line 74 of file options.h.

Value type (if any, otherwise ignored).

Definition at line 55 of file options.h.

Pointer to store param value. If value_pointer ==NULL then the option has no parameters. Ex: in "--port 2000", "--port" is the name and "2000" is the value. value_pointer is interpreted according to the value of "type". type=OPTION_INT: value_pointer is a "int *" type=OPTION_STRING: value_pointer is a "char **" A new string is allocated using malloc(): *(value_pointer) = malloc( ... ) and you should free it yourself. type=OPTION_DOUBLE: value_pointer is a "double *" type=OPTION_ALTERNATIVE: value_pointer is a "int *" and alternatives is set.

Definition at line 70 of file options.h.


The documentation for this struct was generated from the following file:


csm
Author(s): Andrea Censi
autogenerated on Mon Jan 16 2017 03:48:29