/
gmSCSequenceClass
gmSCSequenceClass
- Mark Juras
Owned by Mark Juras
The Sequence Service Class
The service class Sequence manages sequences stored in long memory. A Sequence is an open ended list of entries. New entries can only be added to the end. Entries can be retrieved by their position number in the list. They are based in long memory and have no upper limit other than that imposed by the platform limits. Conceptually, the records of a sequence are viewed as records within a linear vector with no upper bound. The problem is that since multiple sequences must share the same linear addressing scheme, each sequence must be blocked and the locations in long memory of those blocks must be retained in higher level blocks.The method Sequence_Access
Prototypeint* Sequence_Access(void* This,int SeqNum,int delta);
Parameter | Description |
This | Specifies the handle for the information structure controlling the sequence. |
SeqNum | Specifies the sequence number of desired record. A zero indicates that a new record is desired at the back of the stream. |
delta | Specifies the intent of the access -- a nonzero value indicates that the record will be changed and a zero value indicates that it will only be read. |
The method returns a pointer to the start of the requested slot. If there is insufficient file space to achieve this, then a NULL is returned.
The method Sequence_Close
Prototypevoid Sequence_Close(void* This);
Parameter | Description |
This | Specifies the handle for the information structure controlling the sequence. |
The method Sequence_GetLength
Prototypeint Sequence_GetLength(void* This);
Parameter | Description |
This | Specifies the handle for the information structure controlling the sequence. |
The method Sequence_GetRoot
Prototypeint Sequence_GetRoot(void* This);
Parameter | Description |
This | Specifies the handle for the information structure controlling the sequence. |
The method Sequence_GetStorage
Prototypevoid* Sequence_GetStorage(void* This);
Parameter | Description |
This | Specifies the handle for the information structure controlling the sequence. |
The method Sequence_Create
Prototypevoid* Sequence_Create(void* Storage,int blockSize);
Parameter | Description |
Storage | Specifies the handle for the LongMemory storage area that is to contain the sequence. |
blockSize | Specifies the size of each block within the sequence. It is normally a small value like 8 or 16. |
The method Sequence_Open
Prototypevoid* Sequence_Open(void* Storage,int Properties);
Parameter | Description |
Storage | Specifies the handle for theLongMemory storage area that contains the sequence. |
Properties | Specifies the base address in the storage area of the property vector for the sequence. This value must have been originally obtained from the Sequence_GetRoot method after the sequence was created. |
Table of Contents