Public Member Functions | Public Attributes | Private Member Functions | List of all members
libuavcan_dsdl_compiler.pyratemp.Renderer Class Reference
Inheritance diagram for libuavcan_dsdl_compiler.pyratemp.Renderer:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, evalfunc, escapefunc)
 
def render (self, parsetree, data)
 

Public Attributes

 escapefunc
 
 evalfunc
 

Private Member Functions

def _eval (self, expr, data)
 

Detailed Description

Render a template-parse-tree.

:Uses: `TemplateBase` for macros

Definition at line 1057 of file pyratemp.py.

Constructor & Destructor Documentation

◆ __init__()

def libuavcan_dsdl_compiler.pyratemp.Renderer.__init__ (   self,
  evalfunc,
  escapefunc 
)
Init the renderer.

:Parameters:
    - `evalfunc`: function for template-expression-evaluation
      (i.e. ``EvalPseudoSandbox().eval``)
    - `escapefunc`: function for escaping special characters
      (i.e. `escape`)

Definition at line 1063 of file pyratemp.py.

Member Function Documentation

◆ _eval()

def libuavcan_dsdl_compiler.pyratemp.Renderer._eval (   self,
  expr,
  data 
)
private
evalfunc with error-messages

Definition at line 1076 of file pyratemp.py.

◆ render()

def libuavcan_dsdl_compiler.pyratemp.Renderer.render (   self,
  parsetree,
  data 
)
Render a parse-tree of a template.

:Parameters:
    - `parsetree`: the parse-tree
    - `data`:      the data to fill into the template (dictionary)
:Returns:   the rendered output-unicode-string
:Exceptions:
    - `TemplateRenderError`

Definition at line 1084 of file pyratemp.py.

Member Data Documentation

◆ escapefunc

libuavcan_dsdl_compiler.pyratemp.Renderer.escapefunc

Definition at line 1074 of file pyratemp.py.

◆ evalfunc

libuavcan_dsdl_compiler.pyratemp.Renderer.evalfunc

Definition at line 1073 of file pyratemp.py.


The documentation for this class was generated from the following file:


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:04