/
gmscTextBlockClass
gmscTextBlockClass
Mark Juras
Owned by Mark Juras
The TextBlock Service Class
The service class TextBlock contains those methods needed to manage blocked variable length text records via variable data blocks. These data blocks are the lowest level storage medium for relatively short variable length records. Each block views the records it contains as a sequence of relatively short variable length records numbered from 1 to n, where n is the number of records in the block. The block has the following structure:Byte | Description of content |
0-1 | Number of records currently in block (n) |
2-3 | Size of block, or offset of record 0 within block |
4-5 | Offset of first record within block |
6+ | Offsets of remaining records within block |
7+ | Unused space in the block |
8+ | Nth record in the block |
9+ | Records (n-1) to 2 in the block |
10+ | First record in the block |
Note that record numbers within blocks are always expressed relative to one. For insertion requests a record number of zero means to insert before the first record. The chart below shows a sample block containing 50 bytes. The block contains the following four records (Note this chart assumes little-ender byte sex):
Seq | Content |
1 | Sarah |
2 | |
3 | George |
4 | Fred |
By Con By Con By Con By Con By Con -- --- -- --- -- --- -- --- -- --- 0 4 10 35 20 30 40 e 1 0 11 0 21 31 41 o 2 50 12 22 32 42 r 3 0 13 23 33 43 g 4 45 14 24 34 44 e 5 0 15 25 35 F 45 S 6 45 16 26 36 r 46 a 7 0 17 27 37 e 47 r 8 39 18 28 38 d 48 a 9 0 19 29 39 G 49 h
The method TextBlock_Change
PrototypeUBYTE* TextBlock_Change(UBYTE* hBlock,int iRecord,int iStart,int iLength)
Parameter | Description |
The method TextBlock_Data
PrototypeUBYTE* TextBlock_Data(UBYTE* hBlock,int iRecord,int* ipLength)
Parameter | Description |
The method TextBlock_Delete
Prototypeint TextBlock_Delete(UBYTE* hBlock,int iRecord)
Parameter | Description |
The method TextBlock_Insert
PrototypeUBYTE* TextBlock_Insert(UBYTE* hBlock,int iRecord,int len)
Parameter | Description |
The method TextBlock_Room
Prototypeint TextBlock_Room(UBYTE* hBlock,int iInsert)
Parameter | Description |
The method TextBlock_Split
Prototypevoid TextBlock_Split(UBYTE* hBlock1,UBYTE* hBlock2,int iRecord)
Parameter | Description |
Table of Contents
, multiple selections available,
Related content
gmscTextClass
gmscTextClass
More like this
gmSCPagingSystemClass
gmSCPagingSystemClass
More like this
gmSCLongMemoryClass
gmSCLongMemoryClass
More like this
gmslStoreClass
gmslStoreClass
More like this
gmscStoreClass
gmscStoreClass
More like this
gmSCDataQueueClass
gmSCDataQueueClass
More like this