set_mutually_exclusive_groups Subroutine

private subroutine set_mutually_exclusive_groups(self, group1, group2)

Set two CLAs group ad mutually exclusive.

Type Bound

command_line_interface

Arguments

Type IntentOptional Attributes Name
class(command_line_interface), intent(inout) :: self

CLI data.

character(len=*), intent(in) :: group1

Name of the first grouped CLAs.

character(len=*), intent(in) :: group2

Name of the second grouped CLAs.


Calls

proc~~set_mutually_exclusive_groups~~CallsGraph proc~set_mutually_exclusive_groups flap_command_line_interface_t::command_line_interface%set_mutually_exclusive_groups proc~is_defined_group flap_command_line_interface_t::command_line_interface%is_defined_group proc~set_mutually_exclusive_groups->proc~is_defined_group

Called by

proc~~set_mutually_exclusive_groups~~CalledByGraph proc~set_mutually_exclusive_groups flap_command_line_interface_t::command_line_interface%set_mutually_exclusive_groups program~flap_test_nested flap_test_nested program~flap_test_nested->proc~set_mutually_exclusive_groups

Source Code

  subroutine set_mutually_exclusive_groups(self, group1, group2)
  !< Set two CLAs group ad mutually exclusive.
  class(command_line_interface), intent(inout) :: self   !< CLI data.
  character(*),                  intent(in)    :: group1 !< Name of the first grouped CLAs.
  character(*),                  intent(in)    :: group2 !< Name of the second grouped CLAs.
  integer(I4P)                                 :: g1     !< Counter.
  integer(I4P)                                 :: g2     !< Counter.

  if (self%is_defined_group(group=group1, g=g1).and.self%is_defined_group(group=group2, g=g2)) then
    self%clasg(g1)%m_exclude = group2
    self%clasg(g2)%m_exclude = group1
  endif
  endsubroutine set_mutually_exclusive_groups