fdoc

functiongraphs_wantedprivate

logical function graphs_wanted(p, s, id, depth, nodes)

True if entity id is drawn with graphs.

Arguments

NameTypeIntentAttributesDescription
ptype(project_t)in

the project

stype(settings_t)in

the settings

idintegerin

the entity

depthintegerout

its graph_maxdepth

nodesintegerout

its graph_maxnodes

Result

NameTypeAttributesDescription
graphs_wantedlogical

Calls

Source

Show the code
logical function graphs_wanted(p, s, id, depth, nodes)
    type(project_t), intent(in) :: p    !! the project
    type(settings_t), intent(in) :: s   !! the settings
    integer, intent(in) :: id           !! the entity
    integer, intent(out) :: depth       !! its `graph_maxdepth`
    integer, intent(out) :: nodes       !! its `graph_maxnodes`
    logical :: flag, ok
    integer :: k, value

    graphs_wanted = s%graph
    depth = s%graph_maxdepth
    nodes = s%graph_maxnodes
    associate (e => p%list%box(id)%e)
        if (.not. allocated(e%meta)) return
        do k = 1, size(e%meta)
            select case (e%meta(k)%key)
            case ('graph')
                call parse_bool(e%meta(k)%values(1)%s, flag, ok)
                if (ok) graphs_wanted = flag
            case ('graph_maxdepth')
                call parse_int(e%meta(k)%values(1)%s, value, ok)
                if (ok) depth = value
            case ('graph_maxnodes')
                call parse_int(e%meta(k)%values(1)%s, value, ok)
                if (ok) nodes = value
            end select
        end do
    end associate
end function graphs_wanted

Graphs

Calls

Called by