soma-io
5.0.5
|
#include <soma-io/doc/getopt_doc.h>
carto::CartoApplication is normally the entry point of the options parsing system. It inherits OptionsParser to benefit from its addOption(), addOptionSeries() and alias() methods, and parsing is triggered by the initialize() function.
carto::CartoApplication adds the commandline description, and some standard common options which all cartograph commands will provide:
-h
/ –help
prints the commandline and its parameters descriptions–verbose
sets the verbosity level of the commandline (more messages may be printed when the verbosity level increases)–version
shows version information about cartograph libraries and possibly of upper-level libraries based on cartograph–info
prints various information about the libraries, like plugins list, supported IO formats and objects types, versions, external shared data paths, etc.carto::CartoApplication may be subclassed in upper-level libraries which may add some other common options. For instance, AIMS programs will use AimsApplication instead of carto::CartoApplication.
A normal Cartograph program will generally have a main() function looking like the following example: