GRASS GIS 7 Programmer's Manual  7.0.2(2015)-r00000
parser_standard_options.c File Reference

GIS Library - Argument parsing functions (standard options) More...

#include <grass/gis.h>
#include <grass/glocale.h>
#include "parser_local_proto.h"
Include dependency graph for parser_standard_options.c:

Go to the source code of this file.

Functions

struct Option * G_define_standard_option (int opt)
 Create standardised Option structure. More...
 
struct Flag * G_define_standard_flag (int flag)
 Create standardised Flag structure. More...
 

Detailed Description

GIS Library - Argument parsing functions (standard options)

(C) 2001-2014 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Original author CERL
Soeren Gebbert added Dec. 2009 WPS process_description document
Luca Delucchi added Aug 2011 G_OPT_M_DIR

Definition in file parser_standard_options.c.

Function Documentation

struct Flag* G_define_standard_flag ( int  flag)

Create standardised Flag structure.

This function will create a standardised Flag structure defined by parameter flag. A list of valid parameters below. It allocates memory for the Flag structure and returns a pointer to this memory.

If an invalid parameter was specified a empty Flag structure will be returned (not NULL).

  • G_FLG_V_TABLE (do not create attribute table)
  • G_FLG_V_TOPO (do not build topology)
Parameters
flagtype of Flag struct to create specified by STD_FLG enum.
Returns
pointer to an Flag struct

Definition at line 906 of file parser_standard_options.c.

References G_define_flag().

struct Option* G_define_standard_option ( int  opt)

Create standardised Option structure.

This function will create a standardised Option structure defined by parameter opt.

Valid parameters are defined by the STD_OPT enum in the file gis.h. A list of valid parameter values sorted to groups is below.

This function allocates memory for the Option structure and returns a pointer to this memory.

If an invalid parameter was specified a empty Option structure will be returned (not NULL).

List of STD_OPT values sorted by module group
  • database:
    • G_OPT_DB_SQL
    • G_OPT_DB_WHERE
    • G_OPT_DB_TABLE
    • G_OPT_DB_DRIVER
    • G_OPT_DB_DATABASE
    • G_OPT_DB_SCHEMA
    • G_OPT_DB_COLUMN
    • G_OPT_DB_COLUMNS
    • G_OPT_DB_KEYCOLUMN
  • imagery:
    • G_OPT_I_GROUP
    • G_OPT_I_SUBGROUP
  • raster:
    • G_OPT_R_INPUT
    • G_OPT_R_INPUTS
    • G_OPT_R_OUTPUT
    • G_OPT_R_MAP
    • G_OPT_R_MAPS
    • G_OPT_R_BASE
    • G_OPT_R_COVER
    • G_OPT_R_ELEV
    • G_OPT_R_ELEVS
    • G_OPT_R_INTERP_TYPE
    • G_OPT_R_BASENAME_INPUT
    • G_OPT_R_BASENAME_OUTPUT
  • raster3d:
    • G_OPT_R3_INPUT
    • G_OPT_R3_INPUTS
    • G_OPT_R3_OUTPUT
    • G_OPT_R3_MAP
    • G_OPT_R3_MAPS
  • vector:
    • G_OPT_V_INPUT
    • G_OPT_V_INPUTS
    • G_OPT_V_OUTPUT
    • G_OPT_V_MAP
    • G_OPT_V_MAPS
    • G_OPT_V_TYPE
    • G_OPT_V_FIELD
    • G_OPT_V_FIELD_ALL
    • G_OPT_V_CAT
    • G_OPT_V_CATS
    • G_OPT_V_ID
    • G_OPT_V_IDS
  • files
    • G_OPT_F_INPUT
    • G_OPT_F_BIN_INPUT
    • G_OPT_F_OUTPUT
    • G_OPT_F_SEP
  • colors
    • G_OPT_C
    • G_OPT_CN
  • misc
    • G_OPT_M_DIR
    • G_OPT_M_UNITS
    • G_OPT_M_DATATYPE
    • G_OPT_M_MAPSET
    • G_OPT_M_LOCATION
    • G_OPT_M_DBASE
    • G_OPT_M_COORDS
    • G_OPT_M_COLR
    • G_OPT_M_REGION
    • G_OPT_M_NULL_VALUE
  • temporal GIS framework
    • G_OPT_STDS_INPUT
    • G_OPT_STDS_INPUTS
    • G_OPT_STDS_OUTPUT
    • G_OPT_STRDS_INPUT
    • G_OPT_STRDS_INPUTS
    • G_OPT_STRDS_OUTPUT
    • G_OPT_STR3DS_INPUT
    • G_OPT_STR3DS_INPUTS
    • G_OPT_STR3DS_OUTPUT
    • G_OPT_STVDS_INPUT
    • G_OPT_STVDS_INPUTS
    • G_OPT_STVDS_OUTPUT
    • G_OPT_MAP_INPUT
    • G_OPT_MAP_INPUTS
    • G_OPT_STDS_TYPE
    • G_OPT_MAP_TYPE
    • G_OPT_T_TYPE
    • G_OPT_T_WHERE
Parameters
opttype of Option struct to create specified by STD_OPT enum
Returns
pointer to an Option struct

Definition at line 134 of file parser_standard_options.c.

References G_asprintf(), G_color_rules_descriptions(), G_color_rules_options(), and G_define_option().