libsim
Versione6.3.0
|
Module for parsing command-line optons. Continua...
Tipi di dato | |
interface | delete |
Destructor for the optionparser class. Continua... | |
type | optionparser |
This class allows to parse the command-line options of a program in an object-oriented way, similarly to the optparse class found in Python library. Continua... | |
interface | optionparser_add |
Add a new option of a specific type. Continua... | |
Membri pubblici | |
type(optionparser) function, public | optionparser_new (usage_msg, description_msg) |
Create a new instance of an optionparser object. Continua... | |
subroutine, public | optionparser_add_count (this, short_opt, long_opt, dest, start, help) |
Add a new counter option, without optional argument. Continua... | |
subroutine, public | optionparser_add_help (this, short_opt, long_opt, help) |
Add a new help option, with an optional argument. Continua... | |
subroutine, public | optionparser_add_sep (this, help) |
Add a new separator option, with a text. Continua... | |
subroutine, public | optionparser_parse (this, nextarg, status) |
This method performs the parsing of the command-line options which have been previously added using the optionparser_add family of methods. Continua... | |
subroutine, public | optionparser_printhelp (this) |
Print on stdout a human-readable text representation of the help message. Continua... | |
Attributi pubblici | |
integer, parameter, public | optionparser_ok = 0 |
constants indicating the status returned by optionparser_parse, status of parsing: OK Continua... | |
integer, parameter, public | optionparser_help = 1 |
status of parsing: help has been requested Continua... | |
integer, parameter, public | optionparser_err = 2 |
status of parsing: an error was encountered Continua... | |
Membri privati | |
subroutine | optionparser_add_c (this, short_opt, long_opt, dest, default, help, isopt) |
Add a new option with a character type argument. Continua... | |
subroutine | optionparser_add_i (this, short_opt, long_opt, dest, default, help) |
Add a new option with an integer type argument. Continua... | |
subroutine | optionparser_add_iarray (this, short_opt, long_opt, dest, default, help) |
Add a new option with an integer type array argument. Continua... | |
subroutine | optionparser_add_r (this, short_opt, long_opt, dest, default, help) |
Add a new option with a real type argument. Continua... | |
subroutine | optionparser_add_rarray (this, short_opt, long_opt, dest, default, help) |
Add a new option with a real type array argument. Continua... | |
subroutine | optionparser_add_d (this, short_opt, long_opt, dest, default, help) |
Add a new option with a double precision type argument. Continua... | |
subroutine | optionparser_add_darray (this, short_opt, long_opt, dest, default, help) |
Add a new option with a double precision type array argument. Continua... | |
subroutine | optionparser_add_l (this, short_opt, long_opt, dest, help) |
Add a new logical option, without optional argument. Continua... | |
subroutine | optionparser_printhelptxt (this) |
Print on stdout a human-readable text representation of the help message. Continua... | |
subroutine | optionparser_printhelpmd (this) |
Print on stdout a markdown representation of the help message. Continua... | |
subroutine | optionparser_printhelphtmlform (this) |
Print on stdout an html form reflecting the command line options set up. Continua... | |
subroutine | optionparser_make_completion (this) |
Module for parsing command-line optons.
This module defines a class for parsing command-line arguments and generating help messages similar to the one found in the Python library.
This is an example of use:
Definizione alla linea 220 del file optionparser_class.F90.