Implementation of the argument list processor.
Constructor for the argument list
Constructor of the argument list
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
procedure(argument_count_interface), | optional | :: | argument_counter |
Argument counter interface |
||
procedure(get_argument_interface), | optional | :: | argument_getter |
Argument getter interface |
Newly created argument list
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(argument_list), | intent(in) | :: | self |
Interface of the argument counter
Number of available arguments
Interface of the argument getter
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | idx |
Index of the argument to retrieve, range 0 to argument_counter() |
||
character(len=:), | intent(out), | allocatable | :: | arg |
Returned argument payload, allocation status is used to signal errors |
Argument list class
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(argument), | public, | allocatable | :: | argv(:) |
Array of arguments in this list |
||
integer, | public | :: | nargs | = | 0 |
Number of arguments |
|
character(len=:), | public, | allocatable | :: | prog |
Name of the invoked executable, if available |
Constructor for the argument list
private function new_argument_list (argument_counter, argument_getter) | Constructor of the argument list |
procedure, public :: get | ../../ Get command line argument |
procedure, public :: info | ../../ Display debug information on this instance |
procedure, public :: push_back | ../../ Append a command line argument |