|
|
| GDALArgumentParser (const std::string &program_name, bool bForBinary) |
| | Constructor.
|
| |
|
std::string | usage () const |
| | Return usage message.
|
| |
|
void | add_extra_usage_hint (const std::string &osExtraUsageHint) |
| | Adds an extra usage hint.
|
| |
|
void | display_error_and_usage (const std::exception &err) |
| | Format an exception as an error message and display the program usage.
|
| |
|
Argument & | add_quiet_argument (bool *pVar) |
| | Add -q/–quiet argument, and store its value in *pVar (if pVar not null)
|
| |
|
Argument & | add_input_format_argument (CPLStringList *pvar) |
| | Add "-if format_name" argument for input format, and store its value into *pvar.
|
| |
|
Argument & | add_output_format_argument (std::string &var) |
| | Add "-of format_name" argument for output format, and store its value into var.
|
| |
|
Argument & | add_creation_options_argument (CPLStringList &var) |
| | Add "-co KEY=VALUE" argument for creation options, and store its value into var.
|
| |
|
Argument & | add_metadata_item_options_argument (CPLStringList &var) |
| | Add "-mo KEY=VALUE" argument for metadata item options, and store its value into var.
|
| |
|
Argument & | add_open_options_argument (CPLStringList &var) |
| | Add "-oo KEY=VALUE" argument for open options, and store its value into var.
|
| |
|
Argument & | add_open_options_argument (CPLStringList *pvar) |
| | Add "-oo KEY=VALUE" argument for open options, and store its value into *pvar.
|
| |
|
Argument & | add_output_type_argument (GDALDataType &eDT) |
| | Add "-ot data_type" argument for output type, and store its value into eDT.
|
| |
|
Argument & | add_layer_creation_options_argument (CPLStringList &var) |
| | Add "-lco NAME=VALUE" argument for layer creation options, and store its value into var.
|
| |
|
Argument & | add_dataset_creation_options_argument (CPLStringList &var) |
| | Add "-dsco NAME=VALUE" argument for dataset creation options, and store its value into var.
|
| |
|
void | parse_args_without_binary_name (CSLConstList papszArgs) |
| | Parse command line arguments, without the initial program name.
|
| |
|
void | parse_args (const CPLStringList &aosArgs) |
| | Parse command line arguments, with the initial program name.
|
| |
|
CPLStringList | get_non_positional_arguments (const CPLStringList &aosArgs) |
| | Return the non positional arguments.
|
| |
| Argument & | add_inverted_logic_flag (const std::string &name, bool *store_into=nullptr, const std::string &help="") |
| | Add an inverted logic (default true, false when set) flag. More...
|
| |
| GDALArgumentParser * | add_subparser (const std::string &description, bool bForBinary) |
| | Create and add a subparser to the argument parser, keeping ownership. More...
|
| |
| GDALArgumentParser * | get_subparser (const std::string &name) |
| | Get a subparser by name (case insensitive) More...
|
| |
| bool | is_used_globally (const std::string &name) |
| | Return true if the argument is used in the command line (also checking subparsers, if any) More...
|
| |
Parse command-line arguments for GDAL utilities.
Add helpers over the standard argparse::ArgumentParser class
- Since
- GDAL 3.9