Class ReportFrame
Subclass for reports.
This class follows the pattern with inheritance from Lua classes.
Metamethods
ReportFrame:__index (key) | Lookup of missing class members. |
Methods
ReportFrame:create (...) | Create a new instance. |
ReportFrame:_init (...) | Initialize a new instance. |
ReportFrame:setName (name) | Set name of case. |
ReportFrame:hasName () | Check if the report has name. |
ReportFrame:getName () | Get the name of report. |
ReportFrame:constituents () | Export the constituents as an multivalue return. |
ReportFrame:numConstituents () | Get the number of constituents. |
ReportFrame:addConstituent (part) | Add a constituent. |
ReportFrame:addConstituents (...) | Add several constituents. |
ReportFrame:isOk () | Check if the instance state is ok. |
ReportFrame:hasSkip () | Check if the instance has any member in skip state. |
ReportFrame:hasTodo () | Check if the instance has any member in todo state. |
ReportFrame:setDescription ([str='']) | Set the description. |
ReportFrame:getDescription () | Get the description. |
ReportFrame:hasDescription () | Check if the instance has any description member. |
ReportFrame:realize (renders, lang, counter) | Realize the data by applying a render. |
Metamethods
- ReportFrame:__index (key)
-
Lookup of missing class members.
Parameters:
- key string lookup of member
Returns:
anyRaises:
on wrong arguments
Methods
- ReportFrame:create (...)
-
Create a new instance.
Parameters:
- ... vararg forwarded to superclass create method
Returns:
selfSee also:
- ReportFrame:_init (...)
-
Initialize a new instance.
Parameters:
- ... vararg pushed to constituents
Returns:
self - ReportFrame:setName (name)
-
Set name of case.
Parameters:
- name string or message
Returns:
self - ReportFrame:hasName ()
-
Check if the report has name.
Returns:
boolean - ReportFrame:getName ()
-
Get the name of report.
Returns:
string or message - ReportFrame:constituents ()
-
Export the constituents as an multivalue return.
Note that each constituent is not unwrapped.
Returns:
list of constituents - ReportFrame:numConstituents ()
-
Get the number of constituents.
Returns:
number of constituents - ReportFrame:addConstituent (part)
-
Add a constituent.
Note: there are no checking of arguments!
Parameters:
- part any that can be a constituent
Returns:
self - ReportFrame:addConstituents (...)
-
Add several constituents.
Note: there are no checking of arguments!
Parameters:
- ... vararg list of parts that can be constituents
Returns:
self - ReportFrame:isOk ()
-
Check if the instance state is ok.
Note that initial state is "not ok".
Returns:
boolean state - ReportFrame: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 - ReportFrame: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 - ReportFrame: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:
selfRaises:
on wrong arguments - ReportFrame: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 - ReportFrame:hasDescription ()
-
Check if the instance has any description member.
Returns:
boolean that is set if a description exist - ReportFrame: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