Skip to content

Class mkdoxy::generatorBase::GeneratorBase

ClassList > mkdoxy > generatorBase > GeneratorBase

Base class for all generators.

Public Functions

Type Name
def __init__ (self self, str templateDir="", bool ignore_errors=False, bool debug=False)
Constructor.
def annotated (self self, nodes nodes, dict config=None)
Render an annotated page.
def classes (self self, nodes nodes, dict config=None)
Render a classes page.
def code (self self, node node, dict config=None, str code="")
Render a code page.
def error (self self, dict config, str title, str description, str code_header="", str code="", str code_language="", str snippet_code="")
Render an error page.
def example (self self, Node node, dict config=None)
Render an example page.
def examples (self self, nodes nodes, config config=None)
Render an examples page.
def file (self self, Node node, dict config=None)
Render a file page.
def fileindex (self self, nodes nodes, dict config=None)
Render a fileindex page.
def function (self self, Node node, dict config=None)
Render a function page.
def hierarchy (self self, nodes nodes, dict config=None)
Render a hierarchy page.
def index (self self, nodes nodes, Kind kind_filters, kind_parents kind_parents, str title, dict config=None)
Render an index page.
[Template, dict] loadConfigAndTemplate (self self, str name)
def member (self self, Node node, dict config=None)
Render a member page.
def modules (self self, nodes nodes, dict config=None)
Render a modules page.
def namespaces (self self, nodes nodes, dict config=None)
Render a namespaces page.
def page (self self, Node node, dict config=None)
Render a page.
def programlisting (self self, node node, dict config=None)
Render a programlisting page.
def relatedpages (self self, nodes nodes, dict config=None)
Render a related pages page.
str render (self self, Template tmpl, dict data)
Render a template with given data.

Public Static Functions

Type Name
str shift_each_line (str value, str shift_char="\t")
Shift each line of a given string for a given character.

Public Functions Documentation

function __init__

Constructor.

def mkdoxy::generatorBase::GeneratorBase::__init__ (
    self self,
    str templateDir="",
    bool ignore_errors=False,
    bool debug=False
) 

Parameters:

  • templateDir (str): Path to the directory with custom templates (default: "")
  • ignore_errors (bool): If True, errors will be ignored (default: False)
  • debug (bool): If True, debug messages will be printed (default: False)

function annotated

Render an annotated page.

def mkdoxy::generatorBase::GeneratorBase::annotated (
    self self,
    nodes nodes,
    dict config=None
) 

Parameters:

  • nodes ([Node]): List of nodes to render.
  • config (dict): Config for the template (default: None)

Returns:

(str): Rendered annotated page.


function classes

Render a classes page.

def mkdoxy::generatorBase::GeneratorBase::classes (
    self self,
    nodes nodes,
    dict config=None
) 

Parameters:

  • nodes ([Node]): List of nodes to render.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered classes page.


function code

Render a code page.

def mkdoxy::generatorBase::GeneratorBase::code (
    self self,
    node node,
    dict config=None,
    str code=""
) 

Parameters:

  • node ([Node]): Node to render.
  • config (dict): Config for the template (default: None)
  • code (str): Code to render (default: "")

Returns:

(str): Rendered code page.


function error

Render an error page.

def mkdoxy::generatorBase::GeneratorBase::error (
    self self,
    dict config,
    str title,
    str description,
    str code_header="",
    str code="",
    str code_language="",
    str snippet_code=""
) 

Parameters:

  • config (dict): Config for the template.
  • title (str): Title of the error.
  • description (str): Description of the error.
  • code_header (str): Header of the code (default: "")
  • code (str): Code (default: "")
  • code_language (str): Language of the code (default: "")
  • snippet_code (str): Snippet code (default: "")

function example

Render an example page.

def mkdoxy::generatorBase::GeneratorBase::example (
    self self,
    Node node,
    dict config=None
) 

Parameters:

  • node (Node): Node to render.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered example page.


function examples

Render an examples page.

def mkdoxy::generatorBase::GeneratorBase::examples (
    self self,
    nodes nodes,
    config config=None
) 

Parameters:

  • nodes ([Node]): List of nodes to render.
  • config (dict): Config for the template (default: None)

Returns:

(str): Rendered examples page.


function file

Render a file page.

def mkdoxy::generatorBase::GeneratorBase::file (
    self self,
    Node node,
    dict config=None
) 

Parameters:

  • node (Node): Node to render.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered file page.


function fileindex

Render a fileindex page.

def mkdoxy::generatorBase::GeneratorBase::fileindex (
    self self,
    nodes nodes,
    dict config=None
) 

Parameters:

  • nodes ([Node]): List of nodes to render.
  • config (dict): Config for the template (default: None)

Returns:

(str): Rendered fileindex page.


function function

Render a function page.

def mkdoxy::generatorBase::GeneratorBase::function (
    self self,
    Node node,
    dict config=None
) 

Parameters:

  • node (Node): Node to render.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered function page.


function hierarchy

Render a hierarchy page.

def mkdoxy::generatorBase::GeneratorBase::hierarchy (
    self self,
    nodes nodes,
    dict config=None
) 

Parameters:

  • nodes ([Node]): List of nodes to render.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered hierarchy page.


function index

Render an index page.

def mkdoxy::generatorBase::GeneratorBase::index (
    self self,
    nodes nodes,
    Kind kind_filters,
    kind_parents kind_parents,
    str title,
    dict config=None
) 

Parameters:

  • nodes ([Node]): List of nodes to render.
  • kind_filters (Kind): Kind of nodes to render.
  • kind_parents ([Kind]): List of parent kinds of nodes to render.
  • title (str): Title of the index page.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered index page.


function loadConfigAndTemplate

[Template, dict] mkdoxy::generatorBase::GeneratorBase::loadConfigAndTemplate (
    self self,
    str name
) 

function member

Render a member page.

def mkdoxy::generatorBase::GeneratorBase::member (
    self self,
    Node node,
    dict config=None
) 

Parameters:

  • node (Node): Node to render.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered member page.


function modules

Render a modules page.

def mkdoxy::generatorBase::GeneratorBase::modules (
    self self,
    nodes nodes,
    dict config=None
) 

Parameters:

  • nodes ([Node]): List of nodes to render.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered modules page.


function namespaces

Render a namespaces page.

def mkdoxy::generatorBase::GeneratorBase::namespaces (
    self self,
    nodes nodes,
    dict config=None
) 

Parameters:

  • nodes ([Node]): List of nodes to render.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered namespaces page.


function page

Render a page.

def mkdoxy::generatorBase::GeneratorBase::page (
    self self,
    Node node,
    dict config=None
) 

Parameters:

  • node (Node): Node to render.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered page.


function programlisting

Render a programlisting page.

def mkdoxy::generatorBase::GeneratorBase::programlisting (
    self self,
    node node,
    dict config=None
) 

Parameters:

  • node ([Node]): Node to render.
  • config (dict): Config for the template (default: None)

Returns:

(str): Rendered programlisting page.


function relatedpages

Render a related pages page.

def mkdoxy::generatorBase::GeneratorBase::relatedpages (
    self self,
    nodes nodes,
    dict config=None
) 

Parameters:

  • nodes ([Node]): List of nodes to render.
  • config (dict): Config for the template. (default: None)

Returns:

(str): Rendered related pages page.


function render

Render a template with given data.

str mkdoxy::generatorBase::GeneratorBase::render (
    self self,
    Template tmpl,
    dict data
) 

Parameters:

  • tmpl (Template): Template to render.
  • data (dict): Data to render the template.

Returns:

(str): Rendered template.


Public Static Functions Documentation

function shift_each_line

Shift each line of a given string for a given character.

static str mkdoxy::generatorBase::GeneratorBase::shift_each_line (
    str value,
    str shift_char="\t"
) 

It is used to shift the content for Markdown code blocks or other content that should be shifted.

Parameters:

  • value (str): String to shift.
  • shift_char (str): Character to shift the string (default: '\t').

Returns:

(str): Shifted string.



The documentation for this class was generated from the following file mkdoxy/generatorBase.py