fdoc

subroutinegraph_sectionsprivate

subroutine graph_sections(site, id, b)

Write the graphs of entity id.

Arguments

NameTypeIntentAttributesDescription
sitetype(site_t)in

the site

idintegerin

the entity

btype(buffer_t)inout

the HTML

Calls

Called by

Source

Show the code
subroutine graph_sections(site, id, b)
    type(site_t), intent(in) :: site        !! the site
    integer, intent(in) :: id               !! the entity
    type(buffer_t), intent(inout) :: b      !! the HTML
    integer :: k

    if (.not. allocated(site%graphs_of(id)%ids)) return
    do k = 1, size(site%graphs_of(id)%ids)
        associate (g => site%graphs%graphs(site%graphs_of(id)%ids(k)))
            if (len(g%svg) == 0) cycle
            call graph_heading(g%title, b)
            ! a list goes with the graph of the same thing, above it
            if (g%title == 'Uses') call uses_section(site, id, .false., b)
            if (g%title == 'Calls') call calls_section(site, id, .false., b)
            if (g%title == 'Used by' .or. g%title == 'Called by') call neighbour_chips(site, g%neighbours, b)
            call add(b, '<div class="graph">'//g%svg//'</div>'//achar(10))
        end associate
    end do
end subroutine graph_sections