GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71817
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 509 of file gis.h.

Field Documentation

char** Option::answers

Option answers (for multiple=YES)

Definition at line 524 of file gis.h.

Referenced by G_parser(), recreate_command(), and Vect_option_to_types().

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

Routine to check answer or NULL

Definition at line 529 of file gis.h.

int Option::count

Definition at line 530 of file gis.h.

const char* Option::def

Where original answer gets saved

Definition at line 523 of file gis.h.

Referenced by G__usage_html(), G__usage_rest(), G__usage_xml(), G__wps_print_process_description(), and G_parser().

const char* Option::descriptions

';' separated pairs of option and option descriptions

Definition at line 520 of file gis.h.

Referenced by G__script(), G_define_standard_option(), and G_parser().

const char** Option::descs

parsed descriptions, array of either NULL or string

Definition at line 521 of file gis.h.

Referenced by G__usage_html(), G__usage_rest(), G__usage_xml(), and G_parser().

const char* Option::guidependency

GUI dependency

Definition at line 528 of file gis.h.

Referenced by G__script(), and G__usage_xml().

const char* Option::guisection

GUI Layout guidance: ';' delimited hierarchical tree position

Definition at line 527 of file gis.h.

Referenced by G__script(), G__usage_xml(), M_define_option(), and N_define_standard_option().

const char* Option::key_desc
const char* Option::label

Optional short label, used in GUI as item label

Definition at line 518 of file gis.h.

Referenced by G__script(), G__usage_html(), G__usage_rest(), G__usage_xml(), G__wps_print_process_description(), and G_define_standard_option().

struct Option* Option::next_opt
const char* Option::options
const char** Option::opts

NULL or NULL terminated array of parsed options

Definition at line 516 of file gis.h.

Referenced by G__usage_html(), G__usage_rest(), G__usage_xml(), G__wps_print_process_description(), and G_parser().


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