Class Render

Baseclass for renders.

This class follows the pattern with inheritance from Lua classes.

Metamethods

Render:__index (key) Lookup of missing class members.

Methods

Render:create (...) Create a new instance.
Render:_init (...) Initialize a new instance.
Render:cleanKey (str) Clean key.
Render:key (str) Override key construction.
Render:type () Get the type of report.
Render:append (head, tail) Append same type to first.
Render:realizeClarification (keyPart, lang, counter) Realize clarification.
Render:realizeComment (src, keyPart, lang) Realize comment.


Metamethods

Render:__index (key)
Lookup of missing class members.

Parameters:

Returns:

any

Raises:

on wrong arguments

Methods

Render:create (...)
Create a new instance. Assumption is either to create a new instance from an existing class, or from a previous instance of some kind.

Parameters:

  • ... vararg forwarded to _init()

Returns:

self
Render:_init (...)
Initialize a new instance.

Parameters:

  • ... vararg unused

Returns:

self
Render:cleanKey (str)
Clean key. Sole purpose of this is to do assertions and un-tainting.

Parameters:

  • str string to be appended to a base string

Returns:

string

Raises:

on wrong arguments
Render:key (str)
Override key construction. Sole purpose of this is to do assertions, and the provided key is never be used.

Parameters:

  • str string to be appended to a base string

Returns:

string

Raises:

on wrong arguments
Render:type ()
Get the type of report. All reports has an explicit type name.

Returns:

string
Render:append (head, tail)
Append same type to first. The base version only concatenates strings.

Parameters:

  • head any to act as the head
  • tail any to act as the tail

Returns:

any

Raises:

on wrong arguments
Render:realizeClarification (keyPart, lang, counter)
Realize clarification.

Parameters:

  • keyPart string of a message key
  • lang nil or string code
  • counter nil or Counter holding the running count

Returns:

string

Raises:

on wrong arguments
Render:realizeComment (src, keyPart, lang)
Realize comment.

Parameters:

  • src Report that shall be realized
  • keyPart string of a message key
  • lang nil or string code

Returns:

string

Raises:

on wrong arguments
generated by LDoc 1.4.6