{% macro info_bar(entity, incl_src, base_url, line_info) %}
    {% if entity | meta('author') %}
  • {{ entity | meta('author') }}
  • {% endif %} {% if entity | meta('date') %}
  • {{ entity | meta('date') }}
  • {% endif %} {% if entity | meta('license') %}
  • {{ entity | meta('license') }}
  • {% elif projectData['license'] %}
  • {{ projectData['license'] }}
  • {% endif %} {% if entity | meta('since') %}
  • Since: {{ entity | meta('since') }}
  • {% endif %} {% if entity | meta('version') %}
  • {{ entity | meta('version') }}
  • {% endif %} {% if entity | meta('category') %}
  • {{ entity | meta('category') }}
  • {% endif %} {% if line_info %}
  • {{ entity | meta('num_lines') }} statements
  • {% endif %} {% if incl_src %}
  • Source File
  • {% endif %}
{% endmacro %} {% macro panel_contents(name, collection, anchor, panelnum, collection_url=False) %} {% if collection %}
{% for item in collection %} {% if item is string %} {% set name = item %} {% set anchor = item %} {% else %} {% set name = item.name if item.name else "unnamed" %} {% set anchor = item.anchor %} {% endif %} {% set anchor_url = "../{}#{}".format(collection_url, anchor) if collection_url else "../{}".format(item.get_url()) %} {{ name }} {% endfor %}
{% endif %} {% endmacro %} {% macro content_list(self, panelnum=0) %} {# Create the expandable panels for all the possible contents #}

Contents

{{ panel_contents("Common Blocks", self.common, "common", panelnum, self.get_url()) }} {{ panel_contents("Variables", self.variables, "vars", panelnum, self.get_url()) }} {{ panel_contents("Enumerations", self.enums, "enums", panelnum, self.get_url()) }} {{ panel_contents("Constructor", [self.constructor] if self.constructor else [], "cons", panelnum, self.get_url()) }} {{ panel_contents("Programs", self.programs, "progs", panelnum) }} {{ panel_contents("Modules", self.modules, "mods", panelnum) }} {{ panel_contents("Submodules", self.submodules, "submods", panelnum) }} {{ panel_contents("Block Data Units", self.blockdata, "blocks", panelnum) }} {{ panel_contents("Interfaces", self.interfaces, "inters", panelnum, self.get_url()) }} {{ panel_contents("Abstract Interfaces", self.absinterfaces, "absints", panelnum, self.get_url()) }} {{ panel_contents("Derived Types", self.types, "types", panelnum, self.get_url()) }} {{ panel_contents("Functions", self.functions, "funcs", panelnum, self.get_url() if self.obj != "sourcefile" else False) }} {{ panel_contents("Subroutines", self.subroutines, "subs", panelnum, self.get_url() if self.obj != "sourcefile" else False) }} {{ panel_contents("Module Functions", self.modfunctions, "modfuncs", panelnum, self.get_url()) }} {{ panel_contents("Module Subroutines", self.modsubroutines, "modsubs", panelnum, self.get_url()) }} {{ panel_contents("Module Procedures", self.modprocedures, "modprocs", panelnum, self.get_url()) }} {{ panel_contents("Finalization Procedures", self.finalprocs, "fins", panelnum, self.get_url()) }} {{ panel_contents("Type-Bound Procedures", self.boundprocs, "boundprocs", panelnum, self.get_url()) }} {{ panel_contents("Module Procedures", self.modprocs, "modprocs", panelnum, self.get_url()) }} {{ panel_contents("Namelists", self.namelists, "namelists", panelnum, self.get_url()) }} {% if self.src %}

Source Code

{{ self.name }}
{% endif %} {% if not (self.constructor or self.src or self.iterator( "absinterfaces", "args", "blockdata", "boundprocs", "common", "enums", "finalprocs", "functions", "interfaces", "modfunctions", "modsubroutines", "modprocedures", "modprocs", "modules", "namelists", "programs", "submodules", "subroutines", "types", "variables", ) | list ) %} None {% endif %} {% endmacro %} {% macro sidebar(project,self) %} {% endmacro %} {% macro add_comma(condition) %} {# Insert a literal comma if condition is true #} {%- if condition -%},{% endif %} {% endmacro %} {% macro deprecated(entity) %} {# Add 'Deprecated' warning #} {%- if entity | meta('deprecated') -%} Deprecated {%- endif -%} {% endmacro %} {% macro variable_list(variables, intent=False, permission=False, summary=False, id=True) %} {% if permission %}{% endif %} {% if intent %}{% endif %} {% if not intent %}{% endif %} {% set colnum = 6 + permission|int + intent|int %} {% for var in variables %} {% if var.obj == 'variable' %} {% if intent -%} {%- endif %} {% if permission %} {% endif %} {% if not intent %} {% if var.initial -%} {% else %} {% endif %} {% endif %} {% elif var.obj == 'proc' %} {% endif %} {% endfor %}
TypeVisibilityIntentOptionalAttributes NameInitial
{{ var.full_type | relurl(page_url) }}{{ add_comma((intent and var.intent) or var.optional or permission or var.parameter or var.attribs) }} {%- if var.intent -%} intent({{ var.intent }}){{ add_comma(var.optional or permission or var.parameter or var.attribs) }} {%- endif -%} {%- if var.optional -%}optional{{ add_comma(permission or var.parameter or var.attribs) }}{%- endif -%}{{ var.permission }}{{ add_comma(var.parameter or var.attribs) }} {% if var.parameter %}parameter{{ add_comma(var.attribs) }} {% endif %} {{ var.attribs | join(", ") }} :: {{ var.name }}{{ var.dimension }}{% if var.points -%} => {% else %} = {%- endif %} {{ var.initial|e }} {% if summary -%} {{ var | meta('summary') }} {% else %} {{ var.doc }} {% endif %} {{ proc_summary(var,title=True,small=True) }}
{% endmacro %} {%- macro header(size, small=False) -%} {%- if small -%} {%- else -%} {%- endif -%} {% endmacro %} {%- macro close_header(size, small=False) -%} {%- if small -%} {%- else -%} {%- endif -%} {%- endmacro -%} {%- macro docstring(entity, full_docstring=True) -%} {# Display either the full docstring or just the summary #} {%- if full_docstring or not entity.visible -%} {{ entity.doc }} {%- else -%} {{ entity | meta("summary") }} {%- endif -%} {%- endmacro -%} {% macro proc_summary(proc, title=True, small=False, proto=False, full_docstring=False) %} {# Render the summary of a procedure, to be used in lists of procedures, for example #} {% if title %} {{ header(3, small) }} {{ proc_line(proc,proto=proto) }} {% if proto %}Prototype{% endif %} {{ close_header(3, small) }} {% endif %} {% if proc.parent and proc.visible %} {{ meta_list(proc.meta) }} {% endif %} {{ docstring(proc, full_docstring) }} {{ header(4, small) }}Arguments{{ close_header(4, small) }} {% if proc.args %} {{ variable_list(proc.args, intent=True, summary=proc.visible) }} {% else %} None {% endif %} {% if proc.retvar %} {{ header(4, small) }} Return Value {{ proc.retvar.full_declaration | relurl(page_url) }} {{ close_header(4, small) }} {{ docstring(proc.retvar, full_docstring) }} {% endif %} {% endmacro %} {% macro binding_summary(proc,title=True,small=False,proto=False) %} {# Render the documentation for an individual binding of a type-bound procedure #} {% if title %} {{ header(3, small) }} {{ proc_line(proc, proto=proto) }} {%- if proto -%} Prototype {%- endif -%} {{ close_header(3, small) }} {% endif %} {% if proc.parent and proc.visible %} {{ meta_list(proc.meta) }} {% endif %} {{ docstring(proc, False) }} {{ header(4, small) }}Arguments{{ close_header(4, small) }} {% if proc.args|length %} {{ variable_list(proc.args, intent=True, summary=proc.visible, id=False) }} {% else %} None {% endif %} {% if proc.retvar %} {{ header(4, small) }} Return Value {{ proc.retvar.full_declaration | relurl(page_url) }} {{ close_header(4, small) }} {{ proc.retvar.doc }} {% endif %} {% endmacro %} {% macro bound_declaration(tb, link_name=False) %} {# Type-bound procedure declaration and bindings #} {{ tb.full_declaration | relurl(page_url) }} :: {% if link_name %}{{ tb | relurl(page_url) }}{% else %}{{ tb.name }}{% endif %} {%- if tb.generic or (tb.name != tb.bindings[0].name and tb.name != tb.bindings[0]) %} => {{ tb.bindings | join(", ") }}{% endif %} {% if tb.binding|length == 1 %}{{ tb.bindings[0].proctype }}{% endif %} {% endmacro %} {% macro bound_info(tb) %}

{{ bound_declaration(tb) }} {{ deprecated(tb) }}

{% if tb.doc or meta_list(tb.meta)|trim|length is more_than_one %}
{{ meta_list(tb.meta) }} {{ docstring(tb) }}
{% endif %}
{% endmacro %} {% macro interface(intr, full_docstring=True) %}

{% if intr.parobj == 'module' and intr.generic %}{{ intr.permission }}{% endif %} interface {%- if intr.generic %} {{ intr | relurl(page_url) }} {% endif -%} {{ deprecated(intr) }}

{% if intr.doc or (meta_list(intr.meta)|trim and not intr.visible) %}
{% if not intr.visible %} {{ meta_list(intr.meta) }} {% endif %} {{ docstring(intr, full_docstring) }}
{% endif %}
{% endmacro %} {% macro absinterface(intr) %}

abstract interface {{ deprecated(intr) }}

{% if intr.doc or meta_list(intr.meta)|trim %}
{{ meta_list(intr.meta) }} {{ intr | meta('summary') }}
{% endif %}
{% endmacro %} {% macro proc_line(proc, link=True, proto=False) %} {% if proc.mp %}module procedure {% if not proc.parent or (proc.visible and link) %}{{ page_url }} {{ proc | relurl(page_url) }}{% else %}{{ proc.name }}{% endif %} {% endif -%} {% if (proc.parobj == 'module' or (proc.parobj == 'interface' and proc.parent.parobj == 'module')) and not proto %}{{ proc.permission }} {% endif -%} {{ proc.attribs | join(" ") }} {{ proc.proctype |lower }} {%- if not proc.parent or (proc.visible and link and not proc.mp) %} {{ proc | relurl(page_url) }}{% else %} {{ proc.name }}{% endif -%} ({{ proc.args | join(", ") }}) {%- if proc.proctype|lower == 'function' and proc.name != proc.retvar.name %} result({{ proc.retvar.name }}){% endif -%} {% if proc.bindC %} bind({{ proc.bindC }}){% endif %} {% if proc.mp %}{% endif %} {{ deprecated(proc) }} {% if proc.module and proc.module != True and proc.module.visible %} {% set label = "Implementation" if proc.parobj == 'interface' else "Interface" %} {% endif %} {% endmacro %} {% macro final(proc) %}

final :: {{ proc.name }} {{ deprecated(proc) }}

{{ meta_list(proc.meta) }} {{ docstring(proc) }}
{% endmacro %} {% macro display_permission(item) %} {% if item.parobj == "module" or (item.parobj == "interface" and item.parent.parobj == "module") %} {{ item.permission }} {% endif %} {% endmacro %} {% macro type_summary(dtype) %}

type {%- if dtype.parobj == 'module' %}, {{ dtype.permission }}{% endif -%} {%- if dtype.sequence %}, sequence {% endif -%} {%- if dtype.attribs %}, {{ dtype.attribs | join(", ") }}{% endif -%} {%- if dtype.extends %}, extends({{ dtype.extends | relurl(page_url) }}){% endif -%} ::  {{ dtype | relurl(page_url) }} {{ deprecated(dtype) }}

{% if not dtype.visible %} {{ meta_list(dtype.meta) }} {% endif %} {{ dtype | meta('summary') }} {% if dtype.variables %}

Components

{{ variable_list(dtype.variables, permission=True, summary=True) }} {% endif %} {% if dtype.constructor %}

Constructor

{% if dtype.constructor.obj == 'interface' %} {{ docstring(dtype.constructor, full_docstring=False) }} {% endif %} {% if dtype.constructor.obj == 'proc' %} {% elif dtype.constructor.obj == 'interface' %} {% for proc in dtype.constructor.routines|list + dtype.constructor.modprocs|map(attribute="procedure")|list %} {% endfor %} {% endif %}
{{ proc_line(dtype.constructor) }} {{ docstring(dtype.constructor, full_docstring=False) }}
{{ display_permission(proc) }} {{ proc.attribs | join(", ") }} {{ proc.proctype|lower }} {{ proc }} ({{ proc.args | join(", ") }}) {% if proc.bindC -%}, bind({{ proc.bindC }}){% endif %} {{ docstring(proc, full_docstring=False) }}
{% endif %} {% if dtype.finalprocs %}

Finalizations Procedures

{% for fin in dtype.finalprocs %} {% endfor %}
final :: {{ fin.name }} {{ fin | meta('summary') }}
{% endif %} {% if dtype.boundprocs %}

Type-Bound Procedures

{% for tb in dtype.boundprocs %} {% endfor %}
{{ bound_declaration(tb, link_name=True) }} {{ tb | meta('summary') | relurl(page_url) }}
{% endif %}
{% endmacro %} {% macro common_block(com) %}

common{% if com.name %} /{{ com.name }}/{% endif %} {{ deprecated(com) }}

{% if meta_list(com.meta)|trim %} {{ meta_list(com.meta) }} {% endif %} {{ com.doc }} {% if com.variables %} {{ variable_list(com.variables) }} {% endif %}
{% endmacro %} {% macro common_popover(common) %} {%- for item in common.other_uses -%} {%- if item != common -%} {% if item.parent.name -%}{{ item.parent.name }}{%- else -%}unnamed{%- endif %} ({% if item.parobj == 'proc' -%}{{ item.parent.proctype|lower }}{%- else -%}{{ item.parobj }}{%- endif %})
{%- endif -%} {%- endfor -%} {% endmacro %} {% macro enum_entry(enum) %}

enum, bind(c){{ deprecated(enum) }}

Enumerators

{% for var in enum.variables %} {% endfor %}
{{ var.vartype }}:: {{ var.name }} = {{ var.initial }}{% if summary -%}{{ var | meta('summary') }}{% else %}{{ var.doc }}{% endif %}
{% if enum.doc or meta_list(enum.meta)|trim %}

Description

{{ meta_list(enum.meta) }} {{ enum.doc }} {% endif %}
{% endmacro %} {% macro proc_entry(proc) %}
{{ honkle }}

{{ proc_line(proc) }}

{{ proc_summary(proc,False) }}
{% endmacro %} {# The full panel for a single namelist on another entitys page #} {% macro namelist_panel(namelist) %}

Namelist {{ namelist | relurl(page_url) }}

{{ namelist_summary(namelist, False) }}
{% endmacro %} {# Variable table for a single namelist #} {% macro namelist_summary(namelist, full_docstring) %} {{ docstring(namelist, full_docstring) }}

Variables

{% for variable in namelist.variables %} {{ namelist_row(variable, full_docstring) }} {% endfor %}
Name Type Default Description
{% endmacro %} {# A single row of the namelist variable table #} {% macro namelist_row(variable, full_docstring) %} {% if variable is string %} {{ variable }} {% else %} {{ variable.name }} {{ variable.full_type | relurl(page_url) }} {{ variable.initial | e }} {{ docstring(variable, full_docstring) }} {% endif %} {% endmacro %} {% macro use_list(obj) %} {% if obj.uses or obj.ancestry %}

Uses

{% endif %} {% endmacro %} {% macro usedby_list(obj) %} {% if obj.usedbygraph or obj.descendants %}

Used by

{% endif %} {% endmacro %} {% macro meta_list(meta) %} {% if meta.author or meta.date or meta.license or meta.version or meta.category %}
{% if meta.author %}
Author
{{ meta.author }}
{% endif %} {% if meta.date %}
Date
{{ meta.date }}
{% endif %} {% if meta.license %}
License
{{ meta.license }}
{% elif projectData['license'] %}
License
{{ projectData['license'] }}
{% endif %} {% if meta.since %}
Since
{{ meta.since }}
{% endif %} {% if meta.version %}
Version
{{ meta.version }}
{% endif %} {% if meta.category %}
Category
{{ meta.category }}
{% endif %}
{% endif %} {% endmacro %}