home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR36
/
BTV200.ZIP
/
BTVX.INT
< prev
next >
Wrap
Text File
|
1993-12-18
|
4KB
|
125 lines
{*
*=========================================================================
* BTVX.PAS Version 2.00
*
* BTRIEVE object oriented interface for Turbo Pascal 6.0, 7.0
*
* Copyright (c) 1993 by Richard W. Hansen, all rights reserved.
*
*
* Requires Turbo Pascal version 6.0, 7.0
*
*
* Registration and payment of a license fee is required for any use, whether
* in whole or part, of this source code.
*=========================================================================
*
*}
{****************************************************************************}
{* REVISION HISTORY *}
{* *}
{* Date Who What *}
{* ======================================================================== *}
{* 10/02/93 RWH Initial release coded and tested. *}
{****************************************************************************}
UNIT BtvX;
{$F-}
{$V-}
{$X+}
{$A-}
INTERFACE
USES
Objects, { Turbo Vision unit for TObject & TCollection }
BtvConst,
Btv,
{$IFDEF MSDOS}
BTRVDOS;
{$ENDIF}
{$IFDEF DPMI}
BTRVDPMI;
{$ENDIF}
{$IFDEF WINDOWS}
BTRVWIN;
{$ENDIF}
TYPE
{ object type to hold info on filtering conditions }
PFilterCondition = ^TFilterCondition;
TFilterCondition = Object(TOBject)
fType : Byte;
Size : Word;
Offset : Word;
Compare : Byte;
Logic : Byte;
Data : Pointer;
Destructor Done; virtual;
end;
{ object type to hold info on fields to be extracted }
PFieldExtractor = ^TFieldExtractor;
TFieldExtractor = Object(TOBject)
Size : Word;
Offset : Word;
end;
{ the extended Btrieve type descended from normal Btrieve object type }
PXBtrieveFile = ^XBtrieveFile;
XBtrieveFile = Object(BtrieveFile)
Filters : PCollection;
Extractors : PCollection;
MaxSkip : Word;
MaxExtract : Word;
XData : PBytes;
XDataSize : Word;
XOffset : Word;
XCount : Word;
XRecCount : Word; { number of records read in XGet }
Constructor Init(FilePath : PathStr;
ErrorObject: PErrorHandler;
DataBuf : Pointer;
DataBufSize: Word);
Destructor Done; Virtual;
Procedure AddFieldToExtract(FieldSize : Word;
FieldOffset : Word);
{- add a field to extract from a record by the XGet}
Procedure AddFilterCondition( FieldType : Byte;
FieldSize : Word;
FieldOffset : Word;
ComparisonType : Byte;
LogicType : Byte;
var ComparisonValue);
{- add a filtering condition used by the XGet }
Function ExtractNextRec(var DataBuf;
DataOnly : Boolean): Boolean;
{- after XGet, extracts each record from the buffer }
Procedure SetExtractCount(ExtractCount : Word);
{- set maximum number of records to get from the file }
Procedure SetRejectCount(RejectCount : Word);
{- set the maximum number of records to skip in search }
Procedure XDone;
{- cleanup and free memory after XGet }
Procedure XInit(XDataBuf : Pointer;
XDataBufSize : Word);
{- setup before an XGet or XInsert }
Procedure XGet(Op : Word);
{- execute an extended Get or Step }
Function XInsert: Word;
{- execute an extended Insert }
Procedure XReset;
{- reset extractor and filter info between XGets }
end;