Public Attributes | List of all members
option Struct Reference

#include <options.h>

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

struct option_alternative* option::alternative

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.

int* option::set_pointer

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

Definition at line 74 of file options.h.

enum option_type option::type

Value type (if any, otherwise ignored).

Definition at line 55 of file options.h.

void* option::value_pointer

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 Tue May 11 2021 02:18:23