The Text Service Class
The service class
Text contains those methods needed to manage ordered sequences of
variable length text records, numbered from 1 to n. These are referred to as "text streams".
The typical retrieval pattern for text streams is that they are first moved to a certain
record in the sequence and then a series of records is accessed from there. The algorithm
used is optimal for moving forward through a sequence records once a starting location has
been established. As such, the general approach differs from those for "normal" sequences in
that the notion of a "current record" or "cursor" is used. The sequence is positioned on a
record and that current record can then be manipulated. In addition to optimizing the
traversal through the records, the approach also optimizes the storage and changing of
records. The individual records are stored in fixed sized blocks in long memory. When a
record in inserted into the stream or when the size of a record is changed only the block
containing the record needs to be repositioned, not the entire stream. Finally, each text
record in the stream consists of two parts: a fixed length component called the "record
associated information" followed by the remaining text part, simply called the "record".
There is no actual requirement within this class that the records being managed be text
records. This class simply maintains them as opaque blocks of bytes with individually
specified lengths and associated information. The actual implementation code simply refers
to the records being managed as variable length records.
The method Text_Access
Prototype
UBYTE* Text_Access(void* This,int* nRecord,UBYTE** recai,int Delta)
The
Text_Access method Its parameters are:
The method Text_BeforeTop
Prototype
int Text_BeforeTop(void* This)
The
Text_BeforeTop method Its parameters are:
The method Text_Close
Prototype
void Text_Close(void* This)
The
Text_Close method Its parameters are:
The method Text_Create
Prototype
void* Text_Create(void* Store,int recsize)
The
Text_Create method Its parameters are:
The method Text_Current
Prototype
int Text_Current(void* This)
The
Text_Current method Its parameters are:
The method Text_Decrement
Prototype
int Text_Decrement(void* This,int Lines)
The
Text_Decrement method Its parameters are:
The method Text_Delete
Prototype
void Text_Delete(void* This)
The
Text_Delete method Its parameters are:
The method Text_Expand
Prototype
UBYTE* Text_Expand(void* This,int len,int off)
The
Text_Expand method Its parameters are:
The method Text_GetLocation
Prototype
int Text_GetLocation(void* This)
The
Text_GetLocation method Its parameters are:
The method Text_Increment
Prototype
int Text_Increment(void* This,int Lines)
The
Text_Increment method Its parameters are:
The method Text_Insert
Prototype
int Text_Insert(void* This,UBYTE* Record,int length,UBYTE* rai)
The
Text_Insert method Its parameters are:
The method Text_MatchBlocks
Prototype
int Text_MatchBlocks(void* VarStream,UBYTE* textBlock,int matchFlags,int* firstPos,int* firstLeng)
The
Text_MatchBlocks method Its parameters are:
The method Text_Maximum
Prototype
int Text_Maximum(void* This)
The
Text_Maximum method Its parameters are:
The method Text_Open
Prototype
void* Text_Open(void* PageSet,int Sequence)
The
Text_Open method Its parameters are:
The method Text_Position
Prototype
int Text_Position(void* This,int Sequence)
The
Text_Position method Its parameters are:
The method Text_Rewind
Prototype
int Text_Rewind(void* This)
The
Text_Rewind method Its parameters are:
The method Text_SetLocal
Prototype
void Text_SetLocal(void* This)
The
Text_SetLocal method Its parameters are: