Buffer Types and Their Uses

See Figure C.2 for the derivation hierarchy of the buffer classes.

Figure C.2: Buffer variants
\includegraphics{hdr/buffer.ps}

See Table C.1.


Table C.1: Buffer derived types and usage
class functionality plural usage
TmpBuf string temporary false internally, for temporaries
CatBuf string catenation false internally, for temporaries
SqlBuf null-term strings true read via the tws socket api
NulBuf null-term strings true send " " " " "
BarBuf log format output true by the Logger, for requests


A buffer is plural when multiple distinct tokens can be appended to, and distinguished within, the buffer all at one time. E.g., null-terminated strings in a NulBuf, or vertical bar terminated character sequences within a BarBuf. Alternatively, a buffer is singular when each character sequence appended to the buffer is catenated directly adjacent to the previous, the one example being the CatBuf.

Source streams have one msg buffers, stream, providing fixed size blocks as the targets of system input routines,

Cat buffers occur in Tables, the Dbms, the Logger, and the Historian; Nul buffers, in Tables, twice;

There is currently only one instance of a TmpBuf, in Source, where it is shared with a tokenizer for the duration of a parse, and from there used by Cursor::probe, Parser::scan, and Tokens::scan itself.



Subsections
Bill Pippin 2010-01-14