registry_index_of Function

private function registry_index_of(this, target) result(idx)

Bound procedure to find the index of a species from the registry instance.

Type Bound

species_registry_t

Arguments

Type IntentOptional Attributes Name
class(species_registry_t), intent(in) :: this

The species registry instance.

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

The target species name to lookup.

Return Value integer


Source Code

   integer function registry_index_of(this, target) result(idx)
      class(species_registry_t), intent(in) :: this !< Registry object context.
      character(len=*), intent(in) :: target        !< Target species name.
      if (.not. allocated(this%name)) then
         idx = 0
      else
         idx = species_index_of(this%name, this%nspecies, target)
      end if
   end function registry_index_of