Public Attributes | List of all members
gk_option Struct Reference

The structure that stores the information about the command-line options. More...

#include <gk_getopt.h>

Public Attributes

intflag
 
int has_arg
 
char * name
 
int val
 

Detailed Description

The structure that stores the information about the command-line options.

This structure describes a single long option name for the sake of gk_getopt_long(). The argument long_options must be an array of these structures, one for each long option. Terminate the array with an element containing all zeros.

Definition at line 28 of file gk_getopt.h.

Member Data Documentation

◆ flag

int* gk_option::flag

See the discussion on gk_option::val

Definition at line 34 of file gk_getopt.h.

◆ has_arg

int gk_option::has_arg

This field says whether the option takes an argument. It is an integer, and there are three legitimate values: no_argument, required_argument and optional_argument.

Definition at line 30 of file gk_getopt.h.

◆ name

char* gk_option::name

This field is the name of the option.

Definition at line 29 of file gk_getopt.h.

◆ val

int gk_option::val

These fields control how to report or act on the option when it occurs.

If flag is a null pointer, then the val is a value which identifies this option. Often these values are chosen to uniquely identify particular long options.

If flag is not a null pointer, it should be the address of an int variable which is the flag for this option. The value in val is the value to store in the flag to indicate that the option was seen.

Definition at line 35 of file gk_getopt.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:41:02