The class DataTable uses the Write class to produce structured tabular reports
using the content of the runtime data queue. The reports themselves can be produced in one of
three outputStyles: simple tab delimited, text tabular, or html tabular.
The method DataTable.ClearBottom checks to see if there is a bottom mark at the
current top of the data queue. If there is, then it removes that mark. If there is not,
then it or issues a fatal system error.
gmSL: void DefineColumn(string heading, int width);
The method DataTable.DefineColumn sets up the call to the method
DataTable.WriteHeadings which expects the find a series of (String, Integer) pairs in
the data queue. The number of pairs defines the number of columns in the table, each string
entry defines the column heading, and the integer entry defines the field width and
orientation to be used as follows:
Right justify the characters in a cell n characters wide.
Left justify the characters in a cell n characters wide.
hese values are actually only used when the Output Syntax is Text; however,
ince this syntax choice does not take effect until runtime, the values should always be
upplied with reasonable values.
n each call to this method the parameter heading supplies the heading for the next
olumn and the parameter width supplies the width for the next column.
he method DataTable.SetBottom marks the current spot in the queue as the current
ottom. Any attempt to pop value from the queue will fail until this mark is cleared. This
ethod is needed to block any interference between the DataTable class and the other
lasses using the data queue.
he method DataTable.WriteCell writes the current table cell. In many complex output
ituations it is often desirable to nest the output support utilities so that complex
utputs can be nested within each other or can be constructed with independent sets of logic.
his method allows for the writing of complex data cells within data tables. Rather than
riting the current output record and thus clearing its internal buffers so that another
ecord can be written, this method pushes the content of the internal buffer onto the runtime
ata queue and then clears the buffer.
he method DataTable.WriteEnd writes the end portion of an html data table and ends
he centering associated with it.
gmSL: void WriteHeadings();
The method DataTable.WriteHeadings writes a column heading to the currently active
tabular display using the table style specified when the table display was started. The
heading and their desired widths themselves are stored in the runtime data queue via the
he method DataTable.WriteRow writes a data row to the currently active data table
sing the table style specified when the table display was started. The cell content making
p the data raw are stored as strings on the runtime data queue.
he method DataTable.WriteTitle writes a title for a table of values along with other
ontrol information that may be needed to begin the actual table display to the currently
ctive output stream using the form required by the Output Syntax attribute set for
t. The title itself is stored on the runtime data queue prior to the call to this method.