GRASS GIS 7 Programmer's Manual  7.9.dev(2020)-f4bc66038
Option Struct Reference

Structure that stores option information. More...

#include <gis.h>

Collaboration diagram for Option:

Data Fields

const char * key
 
int type
 
int required
 
int multiple
 
const char * options
 
const char ** opts
 
const char * key_desc
 
const char * label
 
const char * description
 
const char * descriptions
 
const char ** descs
 
char * answer
 
const char * def
 
char ** answers
 
struct Optionnext_opt
 
const char * gisprompt
 
const char * guisection
 
const char * guidependency
 
int(* checker )(const char *)
 
int count
 

Detailed Description

Structure that stores option information.

The descriptions member contains pairs of option and option descriptions separated by semicolon ';'. For example, when options member is set using:

opt->options = "break,rmdupl"

the descriptions member should be set to:

"break;break lines on intersections;"
"rmdupl;remove duplicates"

Parsed descriptions are stored in the same order as options.

GUI dependency is a list of options (separated by commas) to be updated if the value is changed.

Used by the G_parser() system.

Definition at line 528 of file gis.h.

Field Documentation

◆ answer

◆ answers

char** Option::answers

Option answers (for multiple=YES)

Definition at line 543 of file gis.h.

◆ checker

int(* Option::checker) (const char *)

Routine to check answer or NULL

Definition at line 548 of file gis.h.

◆ count

int Option::count

Definition at line 549 of file gis.h.

◆ def

const char* Option::def

Where original answer gets saved

Definition at line 542 of file gis.h.

◆ description

const char* Option::description

String describing option

Definition at line 538 of file gis.h.

Referenced by G_define_standard_option(), M_define_option(), N_define_standard_option(), and Rast3d_set_window_params().

◆ descriptions

const char* Option::descriptions

';' separated pairs of option and option descriptions

Definition at line 539 of file gis.h.

Referenced by G_define_standard_option().

◆ descs

const char** Option::descs

parsed descriptions, array of either NULL or string

Definition at line 540 of file gis.h.

◆ gisprompt

const char* Option::gisprompt

Interactive prompt guidance

Definition at line 545 of file gis.h.

Referenced by G__uses_new_gisprompt(), G_define_standard_option(), G_open_option_file(), G_option_to_separator(), and M_define_option().

◆ guidependency

const char* Option::guidependency

GUI dependency

Definition at line 547 of file gis.h.

◆ guisection

const char* Option::guisection

GUI Layout guidance: ';' delimited hierarchical tree position

Definition at line 546 of file gis.h.

Referenced by M_define_option(), and N_define_standard_option().

◆ key

◆ key_desc

const char* Option::key_desc

one word describing the key

Definition at line 536 of file gis.h.

Referenced by G_define_standard_option(), M_define_option(), and N_define_standard_option().

◆ label

const char* Option::label

Optional short label, used in GUI as item label

Definition at line 537 of file gis.h.

Referenced by G_define_standard_option().

◆ multiple

int Option::multiple

Multiple entries OK

Definition at line 533 of file gis.h.

Referenced by G_define_option(), G_define_standard_option(), G_open_option_file(), M_define_option(), and Rast3d_set_window_params().

◆ next_opt

struct Option* Option::next_opt

Pointer to next option struct

Definition at line 544 of file gis.h.

Referenced by G__uses_new_gisprompt().

◆ options

const char* Option::options

Approved values or range or NULL

Definition at line 534 of file gis.h.

Referenced by G_define_standard_option(), and N_define_standard_option().

◆ opts

const char** Option::opts

NULL or NULL terminated array of parsed options

Definition at line 535 of file gis.h.

◆ required

int Option::required

◆ type

int Option::type

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