delete_routehandle Subroutine

public subroutine delete_routehandle(this, spec, rc)

Type Bound

RoutehandleManager

Arguments

Type IntentOptional Attributes Name
class(RoutehandleManager), intent(inout) :: this
type(RoutehandleSpec), intent(in) :: spec
integer, intent(out), optional :: rc

Calls

proc~~delete_routehandle~~CallsGraph proc~delete_routehandle RoutehandleManager%delete_routehandle find find proc~delete_routehandle->find interface~mapl_assert MAPL_Assert proc~delete_routehandle->interface~mapl_assert none~begin~197 RoutehandleSpecVector%begin proc~delete_routehandle->none~begin~197 none~erase~121 RoutehandleSpecVector%erase proc~delete_routehandle->none~erase~121 proc~mapl_return MAPL_Return proc~delete_routehandle->proc~mapl_return none~erase_range~42 RoutehandleSpecVector%erase_range none~erase~121->none~erase_range~42 at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception

Source Code

   subroutine delete_routehandle(this, spec, rc)
      class(RoutehandleManager), intent(inout) :: this
      type(RoutehandleSpec), intent(in) :: spec
      integer, optional, intent(out) :: rc

      type(RoutehandleSpecVectorIterator) :: iter
      type(RoutehandleVectorIterator) :: rh_iter
      associate (b => this%specs%begin(), e => this%specs%end())
        iter = find(b, e, spec)
        _ASSERT(iter /= e, "Spec not found in registry.")

        iter = this%specs%erase(iter)
        rh_iter = this%routehandles%begin() + (iter - b)
        rh_iter = this%routehandles%erase(rh_iter)

      end associate

      _RETURN(_SUCCESS)
   end subroutine delete_routehandle