GRASS 8 Programmer's Manual 8.6.0dev(2026)-5f4f7ad06c
Loading...
Searching...
No Matches
Option Struct Reference

Structure that stores option information. More...

#include <gis.h>

Collaboration diagram for Option:

Data Fields

const charkey
 
int type
 
int required
 
int multiple
 
const charoptions
 
const char ** opts
 
const charkey_desc
 
const charlabel
 
const chardescription
 
const chardescriptions
 
const char ** descs
 
charanswer
 
const chardef
 
char ** answers
 
struct Optionnext_opt
 
const chargisprompt
 
const charguisection
 
const charguidependency
 
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 563 of file gis.h.

Field Documentation

◆ answer

char* Option::answer

Option answer

Definition at line 577 of file gis.h.

◆ answers

char** Option::answers

Option answers (for multiple=YES)

Definition at line 579 of file gis.h.

◆ checker

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

Routine to check answer or NULL

Definition at line 585 of file gis.h.

◆ count

int Option::count

Definition at line 586 of file gis.h.

◆ def

const char* Option::def

Where original answer gets saved

Definition at line 578 of file gis.h.

◆ description

const char* Option::description

String describing option

Definition at line 572 of file gis.h.

Referenced by M_define_option().

◆ descriptions

const char* Option::descriptions

';' separated pairs of option and option descriptions

Definition at line 573 of file gis.h.

◆ descs

const char** Option::descs

parsed descriptions, array of either NULL or string

Definition at line 575 of file gis.h.

◆ gisprompt

const char* Option::gisprompt

Interactive prompt guidance

Definition at line 581 of file gis.h.

Referenced by G__split_gisprompt(), and M_define_option().

◆ guidependency

const char* Option::guidependency

GUI dependency

Definition at line 584 of file gis.h.

◆ guisection

const char* Option::guisection

GUI Layout guidance: ';' delimited hierarchical tree position

Definition at line 582 of file gis.h.

Referenced by M_define_option().

◆ key

const char* Option::key

Key word used on command line

Definition at line 564 of file gis.h.

Referenced by M_define_option().

◆ key_desc

const char* Option::key_desc

one word describing the key

Definition at line 570 of file gis.h.

Referenced by M_define_option().

◆ label

const char* Option::label

Optional short label, used in GUI as item label

Definition at line 571 of file gis.h.

◆ multiple

int Option::multiple

Multiple entries OK

Definition at line 567 of file gis.h.

Referenced by M_define_option().

◆ next_opt

struct Option* Option::next_opt

Pointer to next option struct

Definition at line 580 of file gis.h.

◆ options

const char* Option::options

Approved values or range or NULL

Definition at line 568 of file gis.h.

◆ opts

const char** Option::opts

NULL or NULL terminated array of parsed options

Definition at line 569 of file gis.h.

◆ required

int Option::required

REQUIRED or OPTIONAL

Definition at line 566 of file gis.h.

Referenced by M_define_option().

◆ type

int Option::type

Option type

Definition at line 565 of file gis.h.

Referenced by G__script(), M_define_option(), and Rast3d_get_standard3d_params().


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