The Datatable Service Class
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.
DataTable.ClearBottom Method
gmSL: void ClearBottom();
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
linenumbers | true |
---|
|
<Method id="ClearBottom" type="void" opcode="SCM.DataTable_ClearBottom" />
|
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.
DataTable.DefineColumn Method
gmSL: void DefineColumn(string heading, int width);
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
linenumbers | true |
---|
|
<Method id="DefineColumn" type="void" opcode="SCM.DataTable_DefineColumn" >
<Argument id="heading" type="String" status="ByVal" />
<Argument id="width" type="Integer" status="ByVal" />
</Method>
|
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: Width | Meaning |
+n | Right justify the characters in a cell n characters wide. |
-n | 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.
DataTable.SetBottom Method
gmSL: void SetBottom();
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
linenumbers | true |
---|
|
Method id="SetBottom" type="void" opcode="SCM.DataTable_SetBottom" />
|
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. DataTable.WriteCell Method
gmSL: void WriteCell();
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
linenumbers | true |
---|
|
Method id="WriteCell" type="void" opcode="SCM.DataTable_WriteCell" />
|
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.
DataTable.WriteClose Method
gmSL: void WriteClose();
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
linenumbers | true |
---|
|
Method id="WriteClose" type="void" opcode="SCM.DataTable_WriteClose" />
|
he method
DataTable.WriteClose writes the page closing portion of an html page that as being used to contain data tables.
DataTable.WriteEnd Method
gmSL: void WriteEnd();
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
linenumbers | true |
---|
|
Method id="WriteEnd" type="void" opcode="SCM.DataTable_WriteEnd" />
|
he method
DataTable.WriteEnd writes the end portion of an html data table and ends he centering associated with it.
DataTable.WriteHeadings Method
gmSL: void WriteHeadings(); |X | 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 method
DataTable.DefineColumn.
DataTable.WriteOpen Method
gmSL: void WriteOpen();
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
linenumbers | true |
---|
|
Method id="WriteOpen" type="void" opcode="SCM.DataTable_WriteOpen" />
|
he method
DataTable.WriteOpen writes the page opening portion of an html page that ill be containing data tables.
DataTable.WriteRow Method
gmSL: void WriteRow();
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
linenumbers | true |
---|
|
method id="WriteRow" type="void" opcode="SCM.DataTable_WriteRow" />
|
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.
DataTable.WriteTitle Method
gmSL: void WriteTitle();
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
linenumbers | true |
---|
|
method id="WriteTitle" type="void" opcode="SCM.DataTable_WriteTitle" />
|
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.