[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'BufDataset' (#fcl)

TBufIndex

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Defines the interface used to implement indexes in TBufDataset

Declaration

Source position: bufdataset.pas line 116

type TBufIndex = class(TObject)

public

  DBCompareStruct: TDBCompareStruct;

  

Structure used when comparing record/field values in the index

  Name: string;

  

Name of the index

  FieldsName: string;

  

Field names included in the index

  CaseinsFields: string;

  

Case-insensitive field names in the index

  DescFields: string;

  

Descending fields in the index

  Options: TIndexOptions;

  

Options for the index

  IndNr: Integer;

  

Ordinal position for the index in the list of indexes

  constructor Create(); virtual;

  

Constructor for the class instance

  function ScrollBackward; virtual; abstract;

  

Moves to the prior record in the index

  function ScrollForward; virtual; abstract;

  

Moves to the next record in the index

  function GetCurrent; virtual; abstract;

  

Gets the record buffer for the current record in the dataset

  function ScrollFirst; virtual; abstract;

  

Moves to the first record in the index

  procedure ScrollLast; virtual; abstract;

  

Moves to the last record in the index

  function GetRecord(); virtual;

  

Gets prior/next record relative to the specified bookmark

  procedure SetToFirstRecord; virtual; abstract;

  

Sets the index to the first record in the index order

  procedure SetToLastRecord; virtual; abstract;

  

Sets the index to the last record in the index order

  procedure StoreCurrentRecord; virtual; abstract;

  

Stores the record buffer for the current record

  procedure RestoreCurrentRecord; virtual; abstract;

  

Restores the stored record buiffer to the current record

  function CanScrollForward; virtual; abstract;

  

Indicates if the index can be scrolled forward

  procedure DoScrollForward; virtual; abstract;

  

Implements actions need to scroll forward in the index

  procedure StoreCurrentRecIntoBookmark(); virtual; abstract;

  

  procedure StoreSpareRecIntoBookmark(); virtual; abstract;

  

  procedure GotoBookmark(); virtual; abstract;

  

Moves the index position to the specified Bookmark

  function BookmarkValid(); virtual;

  

Indicates the specified Bookmark is valid

  function CompareBookmarks(); virtual;

  

Gets the relative order for the specified Bookmarks

  function SameBookmarks(); virtual;

  

Indicates if the specified Bookmarks are for the same record

  procedure InitialiseIndex; virtual; abstract;

  

Initializes the index

  procedure InitialiseSpareRecord(); virtual; abstract;

  

Initializes values in the spare record for the index

  procedure ReleaseSpareRecord; virtual; abstract;

  

Releases resources allocated to the spare record for the index

  procedure BeginUpdate; virtual; abstract;

  

  procedure AddRecord; virtual; abstract;

  

Adds a record to the index

  procedure InsertRecordBeforeCurrentRecord(); virtual; abstract;

  

Inserts a record before the current record in the index order

  procedure RemoveRecordFromIndex(); virtual; abstract;

  

Remove the record at the specified bookmark from the index

  procedure OrderCurrentRecord; virtual; abstract;

  

  procedure EndUpdate; virtual; abstract;

  

  property SpareRecord: TRecordBuffer; [r]

  

Spare record for the index

  property SpareBuffer: TRecordBuffer; [r]

  

Spare record buffer for the index

  property CurrentRecord: TRecordBuffer; [r]

  

Current record in the index

  property CurrentBuffer: Pointer; [r]

  

Current record buffer in the index

  property IsInitialized: Boolean; [r]

  

Indicates if the index has been initialized

  property BookmarkSize: Integer; [r]

  

Size (number of bytes) needed for Bookmarks in the index

  property RecNo: LongInt; [rw]

  

Active record number in the index

end;

Inheritance

TBufIndex

  

Defines the interface used to implement indexes in TBufDataset

|

TObject

Description

TBufIndex is a TObject descendant which defines the interface used to implement indexes in TBufDataset. TBufIndex provides access to the Dataset with field values for the index, and methods to perform record navigation and index maintenance.

TBufIndex contains many virtual and abstract methods that should be implemented in a descendent class which provides a specific index implementation, such as: TDoubleLinkedBufIndex, TUniDirectionalBufIndex, and TArrayBufIndex.

TBufIndex is the type used for the TBufDataset.BufferIndex property.

See also

TDoubleLinkedBufIndex

  

Implements an index using a doubly-linked list

TUniDirectionalBufIndex

  

Implements a uni-directional index

TArrayBufIndex

  

Implements an index using an array of record buffers


Documentation generated on: May 14 2021