subroutinebinding_tableprivate
subroutine binding_table(site, ids, b)
Write a table of type-bound procedures.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| site | type(site_t) | in | the site | |
| ids | integer | in | dimension(:) | the bindings |
| b | type(buffer_t) | inout | the HTML |
Calls
Source
Show the code
subroutine binding_table(site, ids, b)
type(site_t), intent(in) :: site !! the site
integer, intent(in) :: ids(:) !! the bindings
type(buffer_t), intent(inout) :: b !! the HTML
integer :: k, j
call add(b, '<table class="arguments">'//achar(10)//'<thead><tr><th>Name</th><th>Binds to</th><th>Attributes</th>')
call add(b, '<th>Description</th></tr></thead>'//achar(10)//'<tbody>'//achar(10))
do k = 1, size(ids)
associate (t => site%p%list%box(ids(k))%e)
call add(b, '<tr id="')
call anchor(site, ids(k), b)
call add(b, '"><td class="name">')
call html_escape(t%name, b, .false.)
call add(b, '</td><td class="binds">')
if (allocated(t%more%proto_text)) then
call link_to(site, t%proto_id, t%more%proto_text, b)
else if (allocated(t%more%binding_ids) .and. .not. t%deferred) then
do j = 1, size(t%more%binding_ids)
if (j > 1) call add(b, ', ')
call link_to(site, t%more%binding_ids(j), t%more%bindings(j)%s, b)
end do
end if
call add(b, '</td><td class="attributes">')
if (t%generic) call badge('generic', b)
if (t%deferred) call badge('deferred', b)
if (t%permission /= 'public') call badge(t%permission, b)
do j = 1, size(t%attribs)
call badge(t%attribs(j)%s, b)
end do
call add(b, '</td><td>')
if (allocated(t%html)) call add(b, t%html)
call add(b, '</td></tr>'//achar(10))
end associate
end do
call add(b, '</tbody>'//achar(10)//'</table>'//achar(10))
end subroutine binding_table