Prechádzať zdrojové kódy

New standard options and modifcation of g.parser to recognize them.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@50919 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 13 rokov pred
rodič
commit
8d8f2b5939

+ 36 - 0
general/g.parser/standard_option.c

@@ -110,6 +110,42 @@ struct Option *define_standard_option(const char *name)
 	key = G_OPT_M_EN;
     else if (G_strcasecmp(name, "G_OPT_V_MAP") == 0)
 	key = G_OPT_V_MAP;
+    else if (G_strcasecmp(name, "G_OPT_STDS_INPUT") == 0)
+	key = G_OPT_STDS_INPUT;
+    else if (G_strcasecmp(name, "G_OPT_STDS_INPUTS") == 0)
+	key = G_OPT_STDS_INPUTS;
+    else if (G_strcasecmp(name, "G_OPT_STDS_OUTPUT") == 0)
+	key = G_OPT_STDS_OUTPUT;
+    else if (G_strcasecmp(name, "G_OPT_STRDS_INPUT") == 0)
+	key = G_OPT_STRDS_INPUT;
+    else if (G_strcasecmp(name, "G_OPT_STRDS_INPUTS") == 0)
+	key = G_OPT_STRDS_INPUTS;
+    else if (G_strcasecmp(name, "G_OPT_STRDS_OUTPUT") == 0)
+	key = G_OPT_STRDS_OUTPUT;
+    else if (G_strcasecmp(name, "G_OPT_STR3DS_INPUT") == 0)
+	key = G_OPT_STR3DS_INPUT;
+    else if (G_strcasecmp(name, "G_OPT_STR3DS_INPUTS") == 0)
+	key = G_OPT_STR3DS_INPUTS;
+    else if (G_strcasecmp(name, "G_OPT_STR3DS_OUTPUT") == 0)
+	key = G_OPT_STR3DS_OUTPUT;
+    else if (G_strcasecmp(name, "G_OPT_STVDS_INPUT") == 0)
+	key = G_OPT_STVDS_INPUT;
+    else if (G_strcasecmp(name, "G_OPT_STVDS_INPUTS") == 0)
+	key = G_OPT_STVDS_INPUTS;
+    else if (G_strcasecmp(name, "G_OPT_STVDS_OUTPUT") == 0)
+	key = G_OPT_STVDS_OUTPUT;
+    else if (G_strcasecmp(name, "G_OPT_MAP_INPUT") == 0)
+	key = G_OPT_MAP_INPUT;
+    else if (G_strcasecmp(name, "G_OPT_MAP_INPUTS") == 0)
+	key = G_OPT_MAP_INPUTS;
+    else if (G_strcasecmp(name, "G_OPT_STDS_TYPE") == 0)
+	key = G_OPT_STDS_TYPE;
+    else if (G_strcasecmp(name, "G_OPT_MAP_TYPE") == 0)
+	key = G_OPT_MAP_TYPE;
+    else if (G_strcasecmp(name, "G_OPT_T_TYPE") == 0)
+	key = G_OPT_T_TYPE;
+    else if (G_strcasecmp(name, "G_OPT_T_WHERE") == 0)
+	key = G_OPT_T_WHERE;
 
     if (key == G_OPT_UNDEFINED)
 	opt = G_define_option();

+ 1 - 0
include/gis.h

@@ -233,6 +233,7 @@ static const char *GRASS_copyright __attribute__ ((unused))
 
     G_OPT_STDS_INPUT,           /* old input space time dataset of type strds, str3ds or stvds */
     G_OPT_STDS_INPUTS,          /* old input space time datasets */
+    G_OPT_STDS_OUTPUT,          /* new output space time dataset */
     G_OPT_STRDS_INPUT,          /* old input space time raster dataset */
     G_OPT_STRDS_INPUTS,         /* old input space time raster datasets */
     G_OPT_STRDS_OUTPUT,         /* new output space time raster dataset */

+ 9 - 0
lib/gis/parser_standard_options.c

@@ -95,6 +95,7 @@
   - 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
@@ -619,6 +620,14 @@ struct Option *G_define_standard_option(int opt)
 	Opt->gisprompt = "old,stds,stds";
 	Opt->description = _("Name of the input space time datasets");
 	break;
+    case G_OPT_STDS_OUTPUT:
+	Opt->key = "output";
+	Opt->type = TYPE_STRING;
+	Opt->key_desc = "name";
+	Opt->required = YES;
+	Opt->gisprompt = "new,stds,stds";
+	Opt->description = _("Name of the output space time dataset");
+	break;
     case G_OPT_STRDS_INPUT:
 	Opt->key = "input";
 	Opt->type = TYPE_STRING;