Class ReportCase

Subclass for reports.

This class follows the pattern with inheritance from Lua classes.

Metamethods

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

Methods

ReportCase:create (...) Create a new instance.
ReportCase:_init (...) Initialize a new instance.
ReportCase:setName (name) Set name of case.
ReportCase:hasName () Check if the report has name.
ReportCase:getName () Get the name of report.
ReportCase:constituents () Export the constituents as an multivalue return.
ReportCase:numConstituents () Get the number of constituents.
ReportCase:addConstituent (part) Add a constituent.
ReportCase:addConstituents (...) Add several constituents.
ReportCase:isOk () Check if the instance state is ok.
ReportCase:hasSkip () Check if the instance has any member in skip state.
ReportCase:hasTodo () Check if the instance has any member in todo state.
ReportCase:setDescription ([str='']) Set the description.
ReportCase:getDescription () Get the description.
ReportCase:hasDescription () Check if the instance has any description member.
ReportCase:realize (renders, lang, counter) Realize the data by applying a render.


Metamethods

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

Parameters:

Returns:

any

Raises:

on wrong arguments

Methods

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

Parameters:

Returns:

self

See also:

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

Parameters:

  • ... vararg pushed to constituents

Returns:

self
ReportCase:setName (name)
Set name of case.

Parameters:

Returns:

self
ReportCase:hasName ()
Check if the report has name.

Returns:

boolean
ReportCase:getName ()
Get the name of report.

Returns:

string or message
ReportCase:constituents ()
Export the constituents as an multivalue return. Note that each constituent is not unwrapped.

Returns:

list of constituents
ReportCase:numConstituents ()
Get the number of constituents.

Returns:

number of constituents
ReportCase:addConstituent (part)
Add a constituent. Note: there are no checking of arguments!

Parameters:

  • part any that can be a constituent

Returns:

self
ReportCase:addConstituents (...)
Add several constituents. Note: there are no checking of arguments!

Parameters:

  • ... vararg list of parts that can be constituents

Returns:

self
ReportCase:isOk ()
Check if the instance state is ok. Note that initial state is "not ok".

Returns:

boolean state
ReportCase:hasSkip ()
Check if the instance has any member in skip state. This will reject all case constituents from the analysis.

Returns:

boolean that is set if any constituent has a skip note
ReportCase:hasTodo ()
Check if the instance has any member in todo state. This will reject all case constituents from the analysis.

Returns:

boolean that is set if any constituent has a skip note
ReportCase:setDescription ([str=''])
Set the description. This is an accessor to set the member. Note that all arguments will be wrapped up in a table before saving.

Parameters:

  • str nil or string that will be used as the description (default '')

Returns:

self

Raises:

on wrong arguments
ReportCase:getDescription ()
Get the description. This is an accessor to get the member. Note that the saved structure will be unpacked before being returned.

Returns:

string used as the description
ReportCase:hasDescription ()
Check if the instance has any description member.

Returns:

boolean that is set if a description exist
ReportCase: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