Declaration¶
Source position: bufdataset.pas line 202
type
TDoubleLinkedBufIndex = class(TBufIndex)
public
FLastRecBuf: PBufRecLinkItem = ^TBufRecLinkItem;
FFirstRecBuf: PBufRecLinkItem = ^TBufRecLinkItem;
FNeedScroll: Boolean;
function ScrollBackward : TGetResult;
function ScrollForward : TGetResult;
function GetCurrent : TGetResult;
function ScrollFirst : TGetResult;
procedure ScrollLast;
function GetRecord : TGetResult;
procedure SetToFirstRecord;
procedure SetToLastRecord;
procedure StoreCurrentRecord;
procedure RestoreCurrentRecord;
function CanScrollForward : Boolean;
procedure DoScrollForward;
procedure StoreCurrentRecIntoBookmark;
procedure StoreSpareRecIntoBookmark;
procedure GotoBookmark;
function CompareBookmarks : Integer;
function SameBookmarks : Boolean;
procedure InitialiseIndex;
procedure InitialiseSpareRecord;
procedure ReleaseSpareRecord;
procedure BeginUpdate;
procedure AddRecord;
procedure InsertRecordBeforeCurrentRecord;
procedure RemoveRecordFromIndex;
procedure OrderCurrentRecord;
procedure EndUpdate;
end;
Inheritance¶
Description¶
TDoubleLinkedBufIndex is a TBufIndex descendant that implements an index using a doubly-linked list. Nodes in the doubly-linked list are implemented using the TBufRecLinkItem record type and the PBufRecLinkItem pointer type. TDoubleLinkedBufIndex provides two sentinel nodes that represent the first and last items in the linked list.
TDoubleLinkedBufIndex is the type used to implement the default index ('DEFAULT_ORDER') in TBufDataset.
Methods¶
| Member | Visibility | Description |
|---|---|---|
| AddRecord | public | Adds a record to the index. |
| BeginUpdate | public | |
| CanScrollForward | public | Indicates if the index can be scrolled towards the end of the index. |
| CompareBookmarks | public | |
| DoScrollForward | public | Implements actions needed to scroll forward using the index. |
| EndUpdate | public | |
| GetCurrent | public | |
| GetRecord | public | |
| GotoBookmark | public | Navigates the index to the specified Bookmark. |
| InitialiseIndex | public | Initializes the index. |
| InitialiseSpareRecord | public | Initializes the spare record in the index. |
| InsertRecordBeforeCurrentRecord | public | Inserts a record prior to the current record in the index. |
| OrderCurrentRecord | public | |
| ReleaseSpareRecord | public | Releases the spare record in the index. |
| RemoveRecordFromIndex | public | Removes the record at the specified Bookmark from the index. |
| RestoreCurrentRecord | public | |
| SameBookmarks | public | Compares Bookmark values for ordering in the index. |
| ScrollBackward | public | Scrolls the index toward the beginning of the index. |
| ScrollFirst | public | Scrolls to the first entry in the index. |
| ScrollForward | public | Scrolls the index towards the end of the index. |
| ScrollLast | public | Scrolls to the last entry in the index. |
| SetToFirstRecord | public | |
| SetToLastRecord | public | |
| StoreCurrentRecIntoBookmark | public | |
| StoreCurrentRecord | public | |
| StoreSpareRecIntoBookmark | public |
Fieldss¶
| Member | Visibility | Description |
|---|---|---|
| FFirstRecBuf | public | |
| FLastRecBuf | public | |
| FNeedScroll | public |
See also¶
| Name | Description |
|---|---|
| TBufIndex | Defines the interface used to implement indexes in TBufDataset. |
| TBufRecLinkItem | Stores bookmarks to the previous and next records in a linked list. |
| PBufRecLinkItem | Pointer to a TBufRecLinkItem type. |
| TBufDataset | Implements a database-aware buffered dataset. |