Class ReportAdapt

Subclass for adapt report.

This class follows the pattern with inheritance from Lua classes.

Metamethods

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

Methods

ReportAdapt:create (...) Create a new instance.
ReportAdapt:_init (...) Initialize a new instance.
ReportAdapt:lines () Export the lines as an multivalue return.
ReportAdapt:numLines () Get the number of lines.
ReportAdapt:isEmpty () Is the report empty?
ReportAdapt:addLine (...) Add a line.
ReportAdapt:getLine ([idx=1]) Get a line.
ReportAdapt:realize (renders, lang, counter) Realize the data by applying a render.


Metamethods

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

Parameters:

Returns:

any

Raises:

on wrong arguments

Methods

ReportAdapt:create (...)
Create a new instance.

Parameters:

Returns:

self

See also:

ReportAdapt:_init (...)
Initialize a new instance.

Parameters:

  • ... vararg pushed to lines

Returns:

self
ReportAdapt:lines ()
Export the lines as an multivalue return. Note that each line is not unwrapped.

Returns:

table list of lines
ReportAdapt:numLines ()
Get the number of lines.

Returns:

number of lines
ReportAdapt:isEmpty ()
Is the report empty?

Returns:

boolean whether the report is empty
ReportAdapt:addLine (...)
Add a line.

Parameters:

  • ... vararg that can be a line

Returns:

self
ReportAdapt:getLine ([idx=1])
Get a line. Note that all parts will be returned wrapped up in a table.

Parameters:

  • idx nil or number line number (default 1)

Returns:

table containing list of parts

Raises:

on wrong arguments
ReportAdapt:realize (renders, lang, counter)
Realize the data by applying a render.

Parameters:

  • renders Renders to use while realizing the reports
  • lang nil or string holding the language code
  • counter nil or Counter holding the running count

Returns:

string
generated by LDoc 1.4.6