Check if a CLA has been defined.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(command_line_interface), | intent(in) | :: | self |
CLI data. |
||
character(len=*), | intent(in) | :: | switch |
Switch name. |
||
character(len=*), | intent(in), | optional | :: | group |
Name of group (command) of CLAs. |
Check if a CLA has been defined.
function is_defined(self, switch, group) !< Check if a CLA has been defined. class(command_line_interface), intent(in) :: self !< CLI data. character(*), intent(in) :: switch !< Switch name. character(*), optional, intent(in) :: group !< Name of group (command) of CLAs. logical :: is_defined !< Check if a CLA has been defined. integer(I4P) :: g !< Counter. is_defined = .false. if (.not.present(group)) then is_defined = self%clasg(0)%is_defined(switch=switch) else if (self%is_defined_group(group=group, g=g)) is_defined = self%clasg(g)%is_defined(switch=switch) endif endfunction is_defined