fdoc

functionhas_graphprivate

logical function has_graph(site, id, title)

True if entity id has a graph titled title.

Arguments

NameTypeIntentAttributesDescription
sitetype(site_t)in

the site

idintegerin

the entity

titlecharacter(len=*)in

the title

Result

NameTypeAttributesDescription
has_graphlogical

Called by

Source

Show the code
logical function has_graph(site, id, title)
    type(site_t), intent(in) :: site        !! the site
    integer, intent(in) :: id               !! the entity
    character(len=*), intent(in) :: title   !! the title
    integer :: k

    has_graph = .false.
    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 (g%title == title .and. len(g%svg) > 0) has_graph = .true.
        end associate
    end do
end function has_graph