0.6.2-dev0
FORCES
FORtran lib for Comp. Env. Sys.
Loading...
Searching...
No Matches
mo_cli::option Module Reference

This is a container for a single command line option. More...

Public Member Functions

procedure print_info (self)
 Print info for an option.
 
procedure is_given_arg (self, arg)
 check if this option is the given argument.
 

Public Attributes

character(:), allocatable help
 description of the option
 
character(:), allocatable name
 long name (will be double hyphenated: –opt)
 
character(1) s_name = ""
 short name (will be hyphenated: -o)
 
logical has_s_name = .false.
 whether the option has a short name
 
logical required = .false.
 whether the option is required
 
logical blank = .false.
 whether the option is passed blank without hyphenated name (only latter one possible)
 
logical was_read = .false.
 whether the option was read from command line
 
logical has_value = .false.
 whether the option has a value
 
logical has_default = .false.
 whether the option has a default value
 
logical repeated = .false.
 whether the option can be read repeatedly
 
integer(i4) read_count = 0_i4
 number of reads (-ooo)
 
character(:), allocatable value
 value of the option (if has one)
 
character(:), allocatable value_name
 name of the value for the help text (default "value")
 
character(:), allocatable default
 default value of the option (if has one)
 

Detailed Description

This is a container for a single command line option.

Definition at line 71 of file mo_cli.f90.

Member Function/Subroutine Documentation

◆ is_given_arg()

procedure mo_cli::option::is_given_arg ( class(option), intent(inout)  self,
character(*), intent(in)  arg 
)

check if this option is the given argument.

Returns
Truth value if the given argument is this option.
See also
mo_cli::is_given_arg

Definition at line 90 of file mo_cli.f90.

◆ print_info()

procedure mo_cli::option::print_info ( class(option), intent(inout)  self)

Print info for an option.

See also
mo_cli::print_info

Definition at line 88 of file mo_cli.f90.

Member Data Documentation

◆ blank

logical mo_cli::option::blank = .false.

whether the option is passed blank without hyphenated name (only latter one possible)

Definition at line 77 of file mo_cli.f90.

◆ default

character(:), allocatable mo_cli::option::default

default value of the option (if has one)

Definition at line 85 of file mo_cli.f90.

◆ has_default

logical mo_cli::option::has_default = .false.

whether the option has a default value

Definition at line 80 of file mo_cli.f90.

◆ has_s_name

logical mo_cli::option::has_s_name = .false.

whether the option has a short name

Definition at line 75 of file mo_cli.f90.

◆ has_value

logical mo_cli::option::has_value = .false.

whether the option has a value

Definition at line 79 of file mo_cli.f90.

◆ help

character(:), allocatable mo_cli::option::help

description of the option

Definition at line 72 of file mo_cli.f90.

◆ name

character(:), allocatable mo_cli::option::name

long name (will be double hyphenated: –opt)

Definition at line 73 of file mo_cli.f90.

◆ read_count

integer(i4) mo_cli::option::read_count = 0_i4

number of reads (-ooo)

Definition at line 82 of file mo_cli.f90.

◆ repeated

logical mo_cli::option::repeated = .false.

whether the option can be read repeatedly

Definition at line 81 of file mo_cli.f90.

◆ required

logical mo_cli::option::required = .false.

whether the option is required

Definition at line 76 of file mo_cli.f90.

◆ s_name

character(1) mo_cli::option::s_name = ""

short name (will be hyphenated: -o)

Definition at line 74 of file mo_cli.f90.

◆ value

character(:), allocatable mo_cli::option::value

value of the option (if has one)

Definition at line 83 of file mo_cli.f90.

◆ value_name

character(:), allocatable mo_cli::option::value_name

name of the value for the help text (default "value")

Definition at line 84 of file mo_cli.f90.

◆ was_read

logical mo_cli::option::was_read = .false.

whether the option was read from command line

Definition at line 78 of file mo_cli.f90.


The documentation for this module was generated from the following file: