functiongraphs_wantedprivate
logical function graphs_wanted(p, s, id, depth, nodes)
True if entity id is drawn with graphs.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| p | type(project_t) | in | the project | |
| s | type(settings_t) | in | the settings | |
| id | integer | in | the entity | |
| depth | integer | out | its | |
| nodes | integer | out | its |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| graphs_wanted | logical |
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