[GRASS-dev] [GRASS-SVN] r60703 - in grass/trunk: display/d.vect general/g.gisenv gui/wxpython/animation lib/python/temporal raster/r.colors raster/r.external raster/r.in.bin raster/r.mapcalc raster/r.neighbors raster/r.out.bin raster/r.quant raster/r.resamp.filter raster/r.series raster/r.series.accumulate raster/r.series.interp raster/r.stats.quantile vector/v.colors vector/v.external.out

Glynn Clements glynn at gclements.plus.com
Thu Jun 19 04:57:51 PDT 2014


Huidae Cho wrote:

> I think we need two more functions:

>         // if the first option is present, all the other options must also be present.
>         // same as multiple G_option_requires(first, opt)...
>         void G_option_requires_all(void *first, ...);

As you note, this can be achieved with multiple G_option_requires()
calls.

>         // if any option is present, all the other options must also be present.
>         // all or nothing from a set
>         void G_option_inclusive(void *first, ...);

This could be achieved with multiple G_option_requires_all() calls. Or
even multiple G_option_requires() calls, but the number of such calls
would grow quadratically.

Apart from minimising the number of calls, there's probably some value
in terms of "documentation" to having specific rules for these cases.

Ultimately, there's no limit to the number of functions which *might*
be required. We should aim to capture all of the common cases first,
then figure out how to deal with anything which remains.

I'll make a start on this.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list