mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-11 03:45:06 -05:00
893 lines
36 KiB
ObjectPascal
893 lines
36 KiB
ObjectPascal
|
{ Compiletime DB support }
|
||
|
Unit uPSC_DB;
|
||
|
{
|
||
|
This file has been generated by UnitParser v0.4, written by M. Knight.
|
||
|
Source Code from Carlo Kok has been used to implement various sections of
|
||
|
UnitParser. Components of ifps3 are used in the construction of UnitParser,
|
||
|
code implementing the class wrapper is taken from Carlo Kok''s conv unility
|
||
|
|
||
|
Licence :
|
||
|
This software is provided 'as-is', without any expressed or implied
|
||
|
warranty. In no event will the author be held liable for any damages
|
||
|
arising from the use of this software.
|
||
|
Permission is granted to anyone to use this software for any kind of
|
||
|
application, and to alter it and redistribute it freely, subject to
|
||
|
the following restrictions:
|
||
|
1. The origin of this software must not be misrepresented, you must
|
||
|
not claim that you wrote the original software.
|
||
|
2. Altered source versions must be plainly marked as such, and must
|
||
|
not be misrepresented as being the original software.
|
||
|
3. You may not create a library that uses this library as a main part
|
||
|
of the program and sell that library.
|
||
|
4. You must have a visible line in your programs aboutbox or
|
||
|
documentation that it is made using Innerfuse Script and where
|
||
|
Innerfuse Pascal Script can be found.
|
||
|
5. This notice may not be removed or altered from any source
|
||
|
distribution.
|
||
|
|
||
|
If you have any questions concerning this license write to Carlo Kok:
|
||
|
ck@carlo-kok.com or try the newsserver:
|
||
|
news://news.carlo-kok.com/
|
||
|
}
|
||
|
{$I PascalScript.inc}
|
||
|
Interface
|
||
|
uses
|
||
|
uPSCompiler;
|
||
|
|
||
|
procedure SIRegisterTDATASET(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTPARAMS(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTPARAM(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTGUIDFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTVARIANTFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTREFERENCEFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTDATASETFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTARRAYFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTADTFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTOBJECTFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTGRAPHICFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTMEMOFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTBLOBFIELD(CL: TPSPascalCompiler);
|
||
|
{$IFDEF DELPHI6UP}
|
||
|
procedure SIRegisterTFMTBCDFIELD(CL: TPSPascalCompiler);
|
||
|
{$ENDIF}
|
||
|
procedure SIRegisterTBCDFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTVARBYTESFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTBYTESFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTBINARYFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTTIMEFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTDATEFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTDATETIMEFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTBOOLEANFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTCURRENCYFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTFLOATFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTAUTOINCFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTWORDFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTLARGEINTFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTSMALLINTFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTINTEGERFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTNUMERICFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTWIDESTRINGFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTSTRINGFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTFIELD(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTLOOKUPLIST(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTFIELDS(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTFIELDLIST(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTFIELDDEFLIST(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTFLATLIST(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTINDEXDEFS(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTINDEXDEF(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTFIELDDEFS(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTFIELDDEF(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTDEFCOLLECTION(CL: TPSPascalCompiler);
|
||
|
procedure SIRegisterTNAMEDITEM(CL: TPSPascalCompiler);
|
||
|
procedure SIRegister_DB(Cl: TPSPascalCompiler);
|
||
|
|
||
|
implementation
|
||
|
Uses Sysutils;
|
||
|
|
||
|
Function RegClassS(cl : TPSPascalCompiler;Const InheritsFrom,Classname : String) : TPSCompileTimeClass;
|
||
|
begin
|
||
|
Result := cl.FindClass(Classname);
|
||
|
if Result = nil then
|
||
|
Result := cl.AddClassN(cl.FindClass(InheritsFrom),Classname)
|
||
|
else
|
||
|
Result.ClassInheritsFrom := cl.FindClass(InheritsFrom);
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTDATASET(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TCOMPONENT','TDATASET') do
|
||
|
begin
|
||
|
RegisterMethod('Function ACTIVEBUFFER : PCHAR');
|
||
|
RegisterMethod('Procedure APPEND');
|
||
|
RegisterMethod('Procedure APPENDRECORD( const VALUES : array of const)');
|
||
|
// RegisterMethod('Function BOOKMARKVALID( BOOKMARK : TBOOKMARK) : BOOLEAN');
|
||
|
RegisterMethod('Procedure CANCEL');
|
||
|
RegisterMethod('Procedure CHECKBROWSEMODE');
|
||
|
RegisterMethod('Procedure CLEARFIELDS');
|
||
|
RegisterMethod('Procedure CLOSE');
|
||
|
RegisterMethod('Function CONTROLSDISABLED : BOOLEAN');
|
||
|
// RegisterMethod('Function COMPAREBOOKMARKS( BOOKMARK1, BOOKMARK2 : TBOOKMARK) : INTEGER');
|
||
|
RegisterMethod('Function CREATEBLOBSTREAM( FIELD : TFIELD; MODE : TBLOBSTREAMMODE) : TSTREAM');
|
||
|
RegisterMethod('Procedure CURSORPOSCHANGED');
|
||
|
RegisterMethod('Procedure DELETE');
|
||
|
RegisterMethod('Procedure DISABLECONTROLS');
|
||
|
RegisterMethod('Procedure EDIT');
|
||
|
RegisterMethod('Procedure ENABLECONTROLS');
|
||
|
{$IFDEF DELPHI2006UP}
|
||
|
RegisterMethod('Function FIELDBYNAME( const FIELDNAME : WIDESTRING) : TFIELD');
|
||
|
RegisterMethod('Function FINDFIELD( const FIELDNAME : WideString) : TFIELD');
|
||
|
{$ELSE}
|
||
|
RegisterMethod('Function FIELDBYNAME( const FIELDNAME : STRING) : TFIELD');
|
||
|
RegisterMethod('Function FINDFIELD( const FIELDNAME : STRING) : TFIELD');
|
||
|
{$ENDIF}
|
||
|
RegisterMethod('Function FINDFIRST : BOOLEAN');
|
||
|
RegisterMethod('Function FINDLAST : BOOLEAN');
|
||
|
RegisterMethod('Function FINDNEXT : BOOLEAN');
|
||
|
RegisterMethod('Function FINDPRIOR : BOOLEAN');
|
||
|
RegisterMethod('Procedure FIRST');
|
||
|
// RegisterMethod('Procedure FREEBOOKMARK( BOOKMARK : TBOOKMARK)');
|
||
|
// RegisterMethod('Function GETBOOKMARK : TBOOKMARK');
|
||
|
RegisterMethod('Function GETCURRENTRECORD( BUFFER : PCHAR) : BOOLEAN');
|
||
|
// RegisterMethod('Procedure GETDETAILDATASETS( LIST : TLIST)');
|
||
|
// RegisterMethod('Procedure GETFIELDLIST( LIST : TLIST; const FIELDNAMES : STRING)');
|
||
|
// RegisterMethod('Procedure GETDETAILLINKFIELDS( MASTERFIELDS, DETAILFIELDS : TLIST)');
|
||
|
// RegisterMethod('Function GETBLOBFIELDDATA( FIELDNO : INTEGER; var BUFFER : TBLOBBYTEDATA) : INTEGER');
|
||
|
RegisterMethod('Procedure GETFIELDNAMES( LIST : TSTRINGS)');
|
||
|
// RegisterMethod('Procedure GOTOBOOKMARK( BOOKMARK : TBOOKMARK)');
|
||
|
RegisterMethod('Procedure INSERT');
|
||
|
RegisterMethod('Procedure INSERTRECORD( const VALUES : array of const)');
|
||
|
RegisterMethod('Function ISEMPTY : BOOLEAN');
|
||
|
RegisterMethod('Function ISLINKEDTO( DATASOURCE : TDATASOURCE) : BOOLEAN');
|
||
|
RegisterMethod('Function ISSEQUENCED : BOOLEAN');
|
||
|
RegisterMethod('Procedure LAST');
|
||
|
RegisterMethod('Function LOCATE( const KEYFIELDS : String; const KEYVALUES : VARIANT; OPTIONS : TLOCATEOPTIONS) : BOOLEAN');
|
||
|
RegisterMethod('Function LOOKUP( const KEYFIELDS : String; const KEYVALUES : VARIANT; const RESULTFIELDS : String) : VARIANT');
|
||
|
RegisterMethod('Function MOVEBY( DISTANCE : INTEGER) : INTEGER');
|
||
|
RegisterMethod('Procedure NEXT');
|
||
|
RegisterMethod('Procedure OPEN');
|
||
|
RegisterMethod('Procedure POST');
|
||
|
RegisterMethod('Procedure PRIOR');
|
||
|
RegisterMethod('Procedure REFRESH');
|
||
|
// RegisterMethod('Procedure RESYNC( MODE : TRESYNCMODE)');
|
||
|
RegisterMethod('Procedure SETFIELDS( const VALUES : array of const)');
|
||
|
RegisterMethod('Function TRANSLATE( SRC, DEST : PCHAR; TOOEM : BOOLEAN) : INTEGER');
|
||
|
RegisterMethod('Procedure UPDATECURSORPOS');
|
||
|
RegisterMethod('Procedure UPDATERECORD');
|
||
|
RegisterMethod('Function UPDATESTATUS : TUPDATESTATUS');
|
||
|
RegisterProperty('AGGFIELDS', 'TFIELDS', iptr);
|
||
|
RegisterProperty('BOF', 'BOOLEAN', iptr);
|
||
|
// RegisterProperty('BOOKMARK', 'TBOOKMARKSTR', iptrw);
|
||
|
RegisterProperty('CANMODIFY', 'BOOLEAN', iptr);
|
||
|
RegisterProperty('DATASETFIELD', 'TDATASETFIELD', iptrw);
|
||
|
RegisterProperty('DATASOURCE', 'TDATASOURCE', iptr);
|
||
|
RegisterProperty('DEFAULTFIELDS', 'BOOLEAN', iptr);
|
||
|
RegisterProperty('DESIGNER', 'TDATASETDESIGNER', iptr);
|
||
|
RegisterProperty('EOF', 'BOOLEAN', iptr);
|
||
|
RegisterProperty('BLOCKREADSIZE', 'INTEGER', iptrw);
|
||
|
RegisterProperty('FIELDCOUNT', 'INTEGER', iptr);
|
||
|
RegisterProperty('FIELDDEFS', 'TFIELDDEFS', iptrw);
|
||
|
RegisterProperty('FIELDDEFLIST', 'TFIELDDEFLIST', iptr);
|
||
|
RegisterProperty('FIELDS', 'TFIELDS', iptr);
|
||
|
RegisterProperty('FIELDLIST', 'TFIELDLIST', iptr);
|
||
|
RegisterProperty('FIELDVALUES', 'VARIANT String', iptrw);
|
||
|
RegisterProperty('FOUND', 'BOOLEAN', iptr);
|
||
|
{$IFDEF DELPHI6UP}
|
||
|
RegisterProperty('ISUNIDIRECTIONAL', 'BOOLEAN', iptr);
|
||
|
{$ENDIF}
|
||
|
RegisterProperty('MODIFIED', 'BOOLEAN', iptr);
|
||
|
RegisterProperty('OBJECTVIEW', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('RECORDCOUNT', 'INTEGER', iptr);
|
||
|
RegisterProperty('RECNO', 'INTEGER', iptrw);
|
||
|
RegisterProperty('RECORDSIZE', 'WORD', iptr);
|
||
|
RegisterProperty('SPARSEARRAYS', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('STATE', 'TDATASETSTATE', iptr);
|
||
|
RegisterProperty('FILTER', 'String', iptrw);
|
||
|
RegisterProperty('FILTERED', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('FILTEROPTIONS', 'TFILTEROPTIONS', iptrw);
|
||
|
RegisterProperty('ACTIVE', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('AUTOCALCFIELDS', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('BEFOREOPEN', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('AFTEROPEN', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('BEFORECLOSE', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('AFTERCLOSE', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('BEFOREINSERT', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('AFTERINSERT', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('BEFOREEDIT', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('AFTEREDIT', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('BEFOREPOST', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('AFTERPOST', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('BEFORECANCEL', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('AFTERCANCEL', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('BEFOREDELETE', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('AFTERDELETE', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('BEFORESCROLL', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('AFTERSCROLL', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('BEFOREREFRESH', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('AFTERREFRESH', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('ONCALCFIELDS', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('ONDELETEERROR', 'TDATASETERROREVENT', iptrw);
|
||
|
RegisterProperty('ONEDITERROR', 'TDATASETERROREVENT', iptrw);
|
||
|
RegisterProperty('ONFILTERRECORD', 'TFILTERRECORDEVENT', iptrw);
|
||
|
RegisterProperty('ONNEWRECORD', 'TDATASETNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('ONPOSTERROR', 'TDATASETERROREVENT', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTPARAMS(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TCOLLECTION','TPARAMS') do
|
||
|
begin
|
||
|
RegisterMethod('Procedure ASSIGNVALUES( VALUE : TPARAMS)');
|
||
|
RegisterMethod('Procedure ADDPARAM( VALUE : TPARAM)');
|
||
|
RegisterMethod('Procedure REMOVEPARAM( VALUE : TPARAM)');
|
||
|
RegisterMethod('Function CREATEPARAM( FLDTYPE : TFIELDTYPE; const PARAMNAME : String; PARAMTYPE : TPARAMTYPE) : TPARAM');
|
||
|
// RegisterMethod('Procedure GETPARAMLIST( LIST : TLIST; const PARAMNAMES : STRING)');
|
||
|
RegisterMethod('Function ISEQUAL( VALUE : TPARAMS) : BOOLEAN');
|
||
|
RegisterMethod('Function PARSESQL( SQL : String; DOCREATE : BOOLEAN) : String');
|
||
|
RegisterMethod('Function PARAMBYNAME( const VALUE : String) : TPARAM');
|
||
|
RegisterMethod('Function FINDPARAM( const VALUE : String) : TPARAM');
|
||
|
RegisterProperty('ITEMS', 'TPARAM INTEGER', iptrw);
|
||
|
RegisterProperty('PARAMVALUES', 'VARIANT String', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTPARAM(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TCOLLECTIONITEM','TPARAM') do
|
||
|
begin
|
||
|
RegisterMethod('Procedure ASSIGNFIELD( FIELD : TFIELD)');
|
||
|
RegisterMethod('Procedure ASSIGNFIELDVALUE( FIELD : TFIELD; const VALUE : VARIANT)');
|
||
|
RegisterMethod('Procedure CLEAR');
|
||
|
// RegisterMethod('Procedure GETDATA( BUFFER : POINTER)');
|
||
|
RegisterMethod('Function GETDATASIZE : INTEGER');
|
||
|
RegisterMethod('Procedure LOADFROMFILE( const FILENAME : String; BLOBTYPE : TBLOBTYPE)');
|
||
|
RegisterMethod('Procedure LOADFROMSTREAM( STREAM : TSTREAM; BLOBTYPE : TBLOBTYPE)');
|
||
|
// RegisterMethod('Procedure SETBLOBDATA( BUFFER : POINTER; SIZE : INTEGER)');
|
||
|
// RegisterMethod('Procedure SETDATA( BUFFER : POINTER)');
|
||
|
{$IFDEF DELPHI6UP}
|
||
|
RegisterProperty('ASBCD', 'CURRENCY', iptrw);
|
||
|
{$ENDIF}
|
||
|
{$IFDEF DELPHI6UP}
|
||
|
RegisterProperty('ASFMTBCD', 'TBCD', iptrw);
|
||
|
{$ENDIF}
|
||
|
RegisterProperty('ASBLOB', 'TBLOBDATA', iptrw);
|
||
|
RegisterProperty('ASBOOLEAN', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('ASCURRENCY', 'CURRENCY', iptrw);
|
||
|
RegisterProperty('ASDATE', 'TDATETIME', iptrw);
|
||
|
RegisterProperty('ASDATETIME', 'TDATETIME', iptrw);
|
||
|
RegisterProperty('ASFLOAT', 'DOUBLE', iptrw);
|
||
|
RegisterProperty('ASINTEGER', 'LONGINT', iptrw);
|
||
|
RegisterProperty('ASSMALLINT', 'LONGINT', iptrw);
|
||
|
RegisterProperty('ASMEMO', 'String', iptrw);
|
||
|
RegisterProperty('ASSTRING', 'String', iptrw);
|
||
|
RegisterProperty('ASTIME', 'TDATETIME', iptrw);
|
||
|
RegisterProperty('ASWORD', 'LONGINT', iptrw);
|
||
|
RegisterProperty('BOUND', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('ISNULL', 'BOOLEAN', iptr);
|
||
|
RegisterProperty('NATIVESTR', 'String', iptrw);
|
||
|
RegisterProperty('TEXT', 'String', iptrw);
|
||
|
RegisterProperty('DATATYPE', 'TFIELDTYPE', iptrw);
|
||
|
{$IFDEF DELPHI6UP}
|
||
|
RegisterProperty('PRECISION', 'INTEGER', iptrw);
|
||
|
RegisterProperty('NUMERICSCALE', 'INTEGER', iptrw);
|
||
|
RegisterProperty('SIZE', 'INTEGER', iptrw);
|
||
|
{$ENDIF}
|
||
|
RegisterProperty('NAME', 'String', iptrw);
|
||
|
RegisterProperty('PARAMTYPE', 'TPARAMTYPE', iptrw);
|
||
|
RegisterProperty('VALUE', 'VARIANT', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTGUIDFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFIELD','TGUIDFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTVARIANTFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFIELD','TVARIANTFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTREFERENCEFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TDATASETFIELD','TREFERENCEFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('REFERENCETABLENAME', 'String', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTDATASETFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TOBJECTFIELD','TDATASETFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('NESTEDDATASET', 'TDATASET', iptr);
|
||
|
RegisterProperty('INCLUDEOBJECTFIELD', 'BOOLEAN', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTARRAYFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TOBJECTFIELD','TARRAYFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTADTFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TOBJECTFIELD','TADTFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTOBJECTFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFIELD','TOBJECTFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('FIELDCOUNT', 'INTEGER', iptr);
|
||
|
RegisterProperty('FIELDS', 'TFIELDS', iptr);
|
||
|
RegisterProperty('FIELDVALUES', 'VARIANT INTEGER', iptrw);
|
||
|
RegisterProperty('UNNAMED', 'BOOLEAN', iptr);
|
||
|
RegisterProperty('OBJECTTYPE', 'String', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTGRAPHICFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TBLOBFIELD','TGRAPHICFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTMEMOFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TBLOBFIELD','TMEMOFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTBLOBFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFIELD','TBLOBFIELD') do
|
||
|
begin
|
||
|
RegisterMethod('Procedure LOADFROMFILE( const FILENAME : String)');
|
||
|
RegisterMethod('Procedure LOADFROMSTREAM( STREAM : TSTREAM)');
|
||
|
RegisterMethod('Procedure SAVETOFILE( const FILENAME : String)');
|
||
|
RegisterMethod('Procedure SAVETOSTREAM( STREAM : TSTREAM)');
|
||
|
RegisterProperty('BLOBSIZE', 'INTEGER', iptr);
|
||
|
RegisterProperty('MODIFIED', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('VALUE', 'String', iptrw);
|
||
|
RegisterProperty('TRANSLITERATE', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('BLOBTYPE', 'TBLOBTYPE', iptrw);
|
||
|
{$IFDEF DELPHI6UP}
|
||
|
RegisterProperty('GRAPHICHEADER', 'BOOLEAN', iptrw);
|
||
|
{$ENDIF}
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
{$IFDEF DELPHI6UP}
|
||
|
procedure SIRegisterTFMTBCDFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TNUMERICFIELD','TFMTBCDFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('VALUE', 'TBCD', iptrw);
|
||
|
RegisterProperty('CURRENCY', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('MAXVALUE', 'String', iptrw);
|
||
|
RegisterProperty('MINVALUE', 'String', iptrw);
|
||
|
RegisterProperty('PRECISION', 'INTEGER', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
{$ENDIF}
|
||
|
|
||
|
procedure SIRegisterTBCDFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TNUMERICFIELD','TBCDFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('VALUE', 'CURRENCY', iptrw);
|
||
|
RegisterProperty('CURRENCY', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('MAXVALUE', 'CURRENCY', iptrw);
|
||
|
RegisterProperty('MINVALUE', 'CURRENCY', iptrw);
|
||
|
RegisterProperty('PRECISION', 'INTEGER', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTVARBYTESFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TBYTESFIELD','TVARBYTESFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTBYTESFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TBINARYFIELD','TBYTESFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTBINARYFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFIELD','TBINARYFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTTIMEFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TDATETIMEFIELD','TTIMEFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTDATEFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TDATETIMEFIELD','TDATEFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTDATETIMEFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFIELD','TDATETIMEFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('VALUE', 'TDATETIME', iptrw);
|
||
|
RegisterProperty('DISPLAYFORMAT', 'String', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTBOOLEANFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFIELD','TBOOLEANFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('VALUE', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('DISPLAYVALUES', 'String', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTCURRENCYFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFLOATFIELD','TCURRENCYFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTFLOATFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TNUMERICFIELD','TFLOATFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('VALUE', 'DOUBLE', iptrw);
|
||
|
RegisterProperty('CURRENCY', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('MAXVALUE', 'DOUBLE', iptrw);
|
||
|
RegisterProperty('MINVALUE', 'DOUBLE', iptrw);
|
||
|
RegisterProperty('PRECISION', 'INTEGER', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTAUTOINCFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TINTEGERFIELD','TAUTOINCFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTWORDFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TINTEGERFIELD','TWORDFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTLARGEINTFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TNUMERICFIELD','TLARGEINTFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('ASLARGEINT', 'LARGEINT', iptrw);
|
||
|
RegisterProperty('VALUE', 'LARGEINT', iptrw);
|
||
|
RegisterProperty('MAXVALUE', 'LARGEINT', iptrw);
|
||
|
RegisterProperty('MINVALUE', 'LARGEINT', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTSMALLINTFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TINTEGERFIELD','TSMALLINTFIELD') do
|
||
|
begin
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTINTEGERFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TNUMERICFIELD','TINTEGERFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('VALUE', 'LONGINT', iptrw);
|
||
|
RegisterProperty('MAXVALUE', 'LONGINT', iptrw);
|
||
|
RegisterProperty('MINVALUE', 'LONGINT', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTNUMERICFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFIELD','TNUMERICFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('DISPLAYFORMAT', 'String', iptrw);
|
||
|
RegisterProperty('EDITFORMAT', 'String', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTWIDESTRINGFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TSTRINGFIELD','TWIDESTRINGFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('VALUE', 'WIDESTRING', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTSTRINGFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFIELD','TSTRINGFIELD') do
|
||
|
begin
|
||
|
RegisterProperty('VALUE', 'String', iptrw);
|
||
|
RegisterProperty('FIXEDCHAR', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('TRANSLITERATE', 'BOOLEAN', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTFIELD(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TCOMPONENT','TFIELD') do
|
||
|
begin
|
||
|
//RegisterMethod('Procedure ASSIGNVALUE( const VALUE : TVARREC)');
|
||
|
RegisterMethod('Procedure CLEAR');
|
||
|
RegisterMethod('Procedure FOCUSCONTROL');
|
||
|
// RegisterMethod('Function GETDATA( BUFFER : POINTER; NATIVEFORMAT : BOOLEAN) : BOOLEAN');
|
||
|
RegisterMethod('Function ISVALIDCHAR( INPUTCHAR : CHAR) : BOOLEAN');
|
||
|
RegisterMethod('Procedure REFRESHLOOKUPLIST');
|
||
|
// RegisterMethod('Procedure SETDATA( BUFFER : POINTER; NATIVEFORMAT : BOOLEAN)');
|
||
|
RegisterMethod('Procedure SETFIELDTYPE( VALUE : TFIELDTYPE)');
|
||
|
// RegisterMethod('Procedure VALIDATE( BUFFER : POINTER)');
|
||
|
{$IFDEF DELPHI6UP}
|
||
|
RegisterProperty('ASBCD', 'TBCD', iptrw);
|
||
|
{$ENDIF}
|
||
|
RegisterProperty('ASBOOLEAN', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('ASCURRENCY', 'CURRENCY', iptrw);
|
||
|
RegisterProperty('ASDATETIME', 'TDATETIME', iptrw);
|
||
|
RegisterProperty('ASFLOAT', 'DOUBLE', iptrw);
|
||
|
RegisterProperty('ASINTEGER', 'LONGINT', iptrw);
|
||
|
RegisterProperty('ASSTRING', 'String', iptrw);
|
||
|
RegisterProperty('ASVARIANT', 'VARIANT', iptrw);
|
||
|
RegisterProperty('ATTRIBUTESET', 'String', iptrw);
|
||
|
RegisterProperty('CALCULATED', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('CANMODIFY', 'BOOLEAN', iptr);
|
||
|
RegisterProperty('CURVALUE', 'VARIANT', iptr);
|
||
|
RegisterProperty('DATASET', 'TDATASET', iptrw);
|
||
|
RegisterProperty('DATASIZE', 'INTEGER', iptr);
|
||
|
RegisterProperty('DATATYPE', 'TFIELDTYPE', iptr);
|
||
|
RegisterProperty('DISPLAYNAME', 'String', iptr);
|
||
|
RegisterProperty('DISPLAYTEXT', 'String', iptr);
|
||
|
RegisterProperty('EDITMASK', 'TEDITMASK', iptrw);
|
||
|
RegisterProperty('EDITMASKPTR', 'TEDITMASK', iptr);
|
||
|
RegisterProperty('EDITMASK', 'String', iptrw);
|
||
|
RegisterProperty('EDITMASKPTR', 'String', iptr);
|
||
|
RegisterProperty('FIELDNO', 'INTEGER', iptr);
|
||
|
RegisterProperty('FULLNAME', 'String', iptr);
|
||
|
RegisterProperty('ISINDEXFIELD', 'BOOLEAN', iptr);
|
||
|
RegisterProperty('ISNULL', 'BOOLEAN', iptr);
|
||
|
RegisterProperty('LOOKUP', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('LOOKUPLIST', 'TLOOKUPLIST', iptr);
|
||
|
RegisterProperty('NEWVALUE', 'VARIANT', iptrw);
|
||
|
RegisterProperty('OFFSET', 'INTEGER', iptr);
|
||
|
RegisterProperty('OLDVALUE', 'VARIANT', iptr);
|
||
|
RegisterProperty('PARENTFIELD', 'TOBJECTFIELD', iptrw);
|
||
|
RegisterProperty('SIZE', 'INTEGER', iptrw);
|
||
|
RegisterProperty('TEXT', 'String', iptrw);
|
||
|
RegisterProperty('VALIDCHARS', 'TFIELDCHARS', iptrw);
|
||
|
RegisterProperty('VALUE', 'VARIANT', iptrw);
|
||
|
RegisterProperty('ALIGNMENT', 'TALIGNMENT', iptrw);
|
||
|
RegisterProperty('AUTOGENERATEVALUE', 'TAUTOREFRESHFLAG', iptrw);
|
||
|
RegisterProperty('CUSTOMCONSTRAINT', 'String', iptrw);
|
||
|
RegisterProperty('CONSTRAINTERRORMESSAGE', 'String', iptrw);
|
||
|
RegisterProperty('DEFAULTEXPRESSION', 'String', iptrw);
|
||
|
RegisterProperty('DISPLAYLABEL', 'String', iptrw);
|
||
|
RegisterProperty('DISPLAYWIDTH', 'INTEGER', iptrw);
|
||
|
RegisterProperty('FIELDKIND', 'TFIELDKIND', iptrw);
|
||
|
RegisterProperty('FIELDNAME', 'String', iptrw);
|
||
|
RegisterProperty('HASCONSTRAINTS', 'BOOLEAN', iptr);
|
||
|
RegisterProperty('INDEX', 'INTEGER', iptrw);
|
||
|
RegisterProperty('IMPORTEDCONSTRAINT', 'String', iptrw);
|
||
|
RegisterProperty('LOOKUPDATASET', 'TDATASET', iptrw);
|
||
|
RegisterProperty('LOOKUPKEYFIELDS', 'String', iptrw);
|
||
|
RegisterProperty('LOOKUPRESULTFIELD', 'String', iptrw);
|
||
|
RegisterProperty('KEYFIELDS', 'String', iptrw);
|
||
|
RegisterProperty('LOOKUPCACHE', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('ORIGIN', 'String', iptrw);
|
||
|
RegisterProperty('PROVIDERFLAGS', 'TPROVIDERFLAGS', iptrw);
|
||
|
RegisterProperty('READONLY', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('REQUIRED', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('VISIBLE', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('ONCHANGE', 'TFIELDNOTIFYEVENT', iptrw);
|
||
|
RegisterProperty('ONGETTEXT', 'TFIELDGETTEXTEVENT', iptrw);
|
||
|
RegisterProperty('ONSETTEXT', 'TFIELDSETTEXTEVENT', iptrw);
|
||
|
RegisterProperty('ONVALIDATE', 'TFIELDNOTIFYEVENT', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTLOOKUPLIST(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TOBJECT','TLOOKUPLIST') do
|
||
|
begin
|
||
|
RegisterMethod('Constructor CREATE');
|
||
|
RegisterMethod('Procedure ADD( const AKEY, AVALUE : VARIANT)');
|
||
|
RegisterMethod('Procedure CLEAR');
|
||
|
RegisterMethod('Function VALUEOFKEY( const AKEY : VARIANT) : VARIANT');
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTFIELDS(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TOBJECT','TFIELDS') do
|
||
|
begin
|
||
|
RegisterMethod('Constructor CREATE( ADATASET : TDATASET)');
|
||
|
RegisterMethod('Procedure ADD( FIELD : TFIELD)');
|
||
|
RegisterMethod('Procedure CHECKFIELDNAME( const FIELDNAME : String)');
|
||
|
RegisterMethod('Procedure CHECKFIELDNAMES( const FIELDNAMES : String)');
|
||
|
RegisterMethod('Procedure CLEAR');
|
||
|
RegisterMethod('Function FINDFIELD( const FIELDNAME : String) : TFIELD');
|
||
|
RegisterMethod('Function FIELDBYNAME( const FIELDNAME : String) : TFIELD');
|
||
|
RegisterMethod('Function FIELDBYNUMBER( FIELDNO : INTEGER) : TFIELD');
|
||
|
RegisterMethod('Procedure GETFIELDNAMES( LIST : TSTRINGS)');
|
||
|
RegisterMethod('Function INDEXOF( FIELD : TFIELD) : INTEGER');
|
||
|
RegisterMethod('Procedure REMOVE( FIELD : TFIELD)');
|
||
|
RegisterProperty('COUNT', 'INTEGER', iptr);
|
||
|
RegisterProperty('DATASET', 'TDATASET', iptr);
|
||
|
RegisterProperty('FIELDS', 'TFIELD INTEGER', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTFIELDLIST(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFLATLIST','TFIELDLIST') do
|
||
|
begin
|
||
|
RegisterMethod('Function FIELDBYNAME( const NAME : String) : TFIELD');
|
||
|
RegisterMethod('Function FIND( const NAME : String) : TFIELD');
|
||
|
RegisterProperty('FIELDS', 'TFIELD INTEGER', iptr);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTFIELDDEFLIST(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TFLATLIST','TFIELDDEFLIST') do
|
||
|
begin
|
||
|
RegisterMethod('Function FIELDBYNAME( const NAME : String) : TFIELDDEF');
|
||
|
RegisterMethod('Function FIND( const NAME : String) : TFIELDDEF');
|
||
|
RegisterProperty('FIELDDEFS', 'TFIELDDEF INTEGER', iptr);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTFLATLIST(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TSTRINGLIST','TFLATLIST') do
|
||
|
begin
|
||
|
RegisterMethod('Constructor CREATE( ADATASET : TDATASET)');
|
||
|
RegisterMethod('Procedure UPDATE');
|
||
|
RegisterProperty('DATASET', 'TDATASET', iptr);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTINDEXDEFS(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TDEFCOLLECTION','TINDEXDEFS') do
|
||
|
begin
|
||
|
RegisterMethod('Constructor CREATE( ADATASET : TDATASET)');
|
||
|
RegisterMethod('Function ADDINDEXDEF : TINDEXDEF');
|
||
|
RegisterMethod('Function FIND( const NAME : String) : TINDEXDEF');
|
||
|
RegisterMethod('Procedure UPDATE');
|
||
|
RegisterMethod('Function FINDINDEXFORFIELDS( const FIELDS : String) : TINDEXDEF');
|
||
|
RegisterMethod('Function GETINDEXFORFIELDS( const FIELDS : String; CASEINSENSITIVE : BOOLEAN) : TINDEXDEF');
|
||
|
RegisterMethod('Procedure ADD( const NAME, FIELDS : String; OPTIONS : TINDEXOPTIONS)');
|
||
|
RegisterProperty('ITEMS', 'TINDEXDEF INTEGER', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTINDEXDEF(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TNAMEDITEM','TINDEXDEF') do
|
||
|
begin
|
||
|
RegisterMethod('Constructor CREATE( OWNER : TINDEXDEFS; const NAME, FIELDS : String; OPTIONS : TINDEXOPTIONS)');
|
||
|
RegisterProperty('FIELDEXPRESSION', 'String', iptr);
|
||
|
RegisterProperty('CASEINSFIELDS', 'String', iptrw);
|
||
|
RegisterProperty('DESCFIELDS', 'String', iptrw);
|
||
|
RegisterProperty('EXPRESSION', 'String', iptrw);
|
||
|
RegisterProperty('FIELDS', 'String', iptrw);
|
||
|
RegisterProperty('OPTIONS', 'TINDEXOPTIONS', iptrw);
|
||
|
RegisterProperty('SOURCE', 'String', iptrw);
|
||
|
RegisterProperty('GROUPINGLEVEL', 'INTEGER', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTFIELDDEFS(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TDEFCOLLECTION','TFIELDDEFS') do
|
||
|
begin
|
||
|
RegisterMethod('Constructor CREATE( AOWNER : TPERSISTENT)');
|
||
|
RegisterMethod('Function ADDFIELDDEF : TFIELDDEF');
|
||
|
RegisterMethod('Function FIND( const NAME : String) : TFIELDDEF');
|
||
|
RegisterMethod('Procedure UPDATE');
|
||
|
RegisterMethod('Procedure ADD( const NAME : String; DATATYPE : TFIELDTYPE; SIZE : INTEGER; REQUIRED : BOOLEAN)');
|
||
|
RegisterProperty('HIDDENFIELDS', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('ITEMS', 'TFIELDDEF INTEGER', iptrw);
|
||
|
RegisterProperty('PARENTDEF', 'TFIELDDEF', iptr);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTFIELDDEF(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TNAMEDITEM','TFIELDDEF') do
|
||
|
begin
|
||
|
// RegisterMethod('Constructor CREATE( OWNER : TFIELDDEFS; const NAME : STRING; DATATYPE : TFIELDTYPE; SIZE : INTEGER; REQUIRED : BOOLEAN; FIELDNO : INTEGER)');
|
||
|
RegisterMethod('Function ADDCHILD : TFIELDDEF');
|
||
|
RegisterMethod('Function CREATEFIELD( OWNER : TCOMPONENT; PARENTFIELD : TOBJECTFIELD; const FIELDNAME : String; CREATECHILDREN : BOOLEAN) : TFIELD');
|
||
|
RegisterMethod('Function HASCHILDDEFS : BOOLEAN');
|
||
|
RegisterProperty('FIELDCLASS', 'TFIELDCLASS', iptr);
|
||
|
RegisterProperty('FIELDNO', 'INTEGER', iptrw);
|
||
|
RegisterProperty('INTERNALCALCFIELD', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('PARENTDEF', 'TFIELDDEF', iptr);
|
||
|
RegisterProperty('REQUIRED', 'BOOLEAN', iptrw);
|
||
|
RegisterProperty('ATTRIBUTES', 'TFIELDATTRIBUTES', iptrw);
|
||
|
RegisterProperty('CHILDDEFS', 'TFIELDDEFS', iptrw);
|
||
|
RegisterProperty('DATATYPE', 'TFIELDTYPE', iptrw);
|
||
|
RegisterProperty('PRECISION', 'INTEGER', iptrw);
|
||
|
RegisterProperty('SIZE', 'INTEGER', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTDEFCOLLECTION(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TOWNEDCOLLECTION','TDEFCOLLECTION') do
|
||
|
begin
|
||
|
// RegisterMethod('Constructor CREATE( ADATASET : TDATASET; AOWNER : TPERSISTENT; ACLASS : TCOLLECTIONITEMCLASS)');
|
||
|
RegisterMethod('Function FIND( const ANAME : String) : TNAMEDITEM');
|
||
|
RegisterMethod('Procedure GETITEMNAMES( LIST : TSTRINGS)');
|
||
|
RegisterMethod('Function INDEXOF( const ANAME : String) : INTEGER');
|
||
|
RegisterProperty('DATASET', 'TDATASET', iptr);
|
||
|
RegisterProperty('UPDATED', 'BOOLEAN', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegisterTNAMEDITEM(CL: TPSPascalCompiler);
|
||
|
Begin
|
||
|
With RegClassS(cl,'TCOLLECTIONITEM','TNAMEDITEM') do
|
||
|
begin
|
||
|
RegisterProperty('NAME', 'String', iptrw);
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
procedure SIRegister_DB(Cl: TPSPascalCompiler);
|
||
|
Begin
|
||
|
cl.AddTypeS('TFieldType', '(ftUnknown, ftString, ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime,'+
|
||
|
'ftBytes, ftVarBytes, ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle, ftDBaseOle, ftTypedBinary, ftCursor, ftFixedChar, ftWideString,'+
|
||
|
'ftLargeint, ftADT, ftArray, ftReference, ftDataSet, ftOraBlob, ftOraClob, ftVariant, ftInterface, ftIDispatch, ftGuid, ftTimeStamp, ftFMTBcd)');
|
||
|
|
||
|
CL.AddTypeS('TDataSetState', '(dsInactive, dsBrowse, dsEdit, dsInsert, dsSetKey, dsCalcFields, dsFilter, dsNewValue, dsOldValue, dsCurValue, dsBlockRead, dsInternalCalc, dsOpening)');
|
||
|
|
||
|
cl.addTypeS('TLocateOption','(loCaseInsensitive, loPartialKey)');
|
||
|
cl.addtypes('TLocateOptions','set of TLocateOption');
|
||
|
cl.addtypes('TUpdateStatus','(usUnmodified, usModified, usInserted, usDeleted)');
|
||
|
cl.addtypes('TUpdateStatusSet', 'set of TUpdateStatus');
|
||
|
|
||
|
cl.addTypeS('TPARAMTYPE', 'BYTE');
|
||
|
RegClassS(cl,'TComponent','TDATASET');
|
||
|
RegClassS(cl,'TComponent','TFIELD');
|
||
|
RegClassS(cl,'TComponent','TFIELDDEFS');
|
||
|
RegClassS(cl,'TComponent','TINDEXDEFS');
|
||
|
RegClassS(cl, 'TComponent', 'TObjectField');
|
||
|
RegClassS(cl, 'TComponent', 'TDataLink');
|
||
|
RegClassS(cl, 'TComponent', 'TDataSource');
|
||
|
RegClassS(cl, 'TComponent', 'TParam');
|
||
|
|
||
|
SIRegisterTNAMEDITEM(Cl);
|
||
|
Cl.addTypeS('TDEFUPDATEMETHOD', 'Procedure');
|
||
|
SIRegisterTDEFCOLLECTION(Cl);
|
||
|
cl.AddConstantN('FAHIDDENCOL','LONGINT').Value.tu32 := 1;
|
||
|
cl.AddConstantN('FAREADONLY','LONGINT').Value.tu32 := 2;
|
||
|
cl.AddConstantN('FAREQUIRED','LONGINT').Value.tu32 := 4;
|
||
|
cl.AddConstantN('FALINK','LONGINT').Value.tu32 := 8;
|
||
|
cl.AddConstantN('FAUNNAMED','LONGINT').Value.tu32 := 16;
|
||
|
cl.AddConstantN('FAFIXED','LONGINT').Value.tu32 := 32;
|
||
|
cl.addTypeS('TFIELDATTRIBUTES', 'BYTE');
|
||
|
SIRegisterTFIELDDEF(Cl);
|
||
|
SIRegisterTFIELDDEFS(Cl);
|
||
|
cl.AddConstantN('IXPRIMARY','LONGINT').Value.tu32 := 1;
|
||
|
cl.AddConstantN('IXUNIQUE','LONGINT').Value.tu32 := 2;
|
||
|
cl.AddConstantN('IXDESCENDING','LONGINT').Value.tu32 := 4;
|
||
|
cl.AddConstantN('IXCASEINSENSITIVE','LONGINT').Value.tu32 := 8;
|
||
|
cl.AddConstantN('IXEXPRESSION','LONGINT').Value.tu32 := 16;
|
||
|
cl.AddConstantN('IXNONMAINTAINED','LONGINT').Value.tu32 := 32;
|
||
|
cl.addTypeS('TINDEXOPTIONS', 'BYTE');
|
||
|
SIRegisterTINDEXDEF(Cl);
|
||
|
SIRegisterTINDEXDEFS(Cl);
|
||
|
SIRegisterTFLATLIST(Cl);
|
||
|
SIRegisterTFIELDDEFLIST(Cl);
|
||
|
SIRegisterTFIELDLIST(Cl);
|
||
|
cl.AddConstantN('FKDATA','LONGINT').Value.tu32 := 1;
|
||
|
cl.AddConstantN('FKCALCULATED','LONGINT').Value.tu32 := 2;
|
||
|
cl.AddConstantN('FKLOOKUP','LONGINT').Value.tu32 := 4;
|
||
|
cl.AddConstantN('FKINTERNALCALC','LONGINT').Value.tu32 := 8;
|
||
|
cl.AddConstantN('FKAGGREGATE','LONGINT').Value.tu32 := 16;
|
||
|
cl.addTypeS('TFIELDKINDS', 'BYTE');
|
||
|
SIRegisterTFIELDS(Cl);
|
||
|
cl.AddConstantN('PFINUPDATE','LONGINT').Value.tu32 := 1;
|
||
|
cl.AddConstantN('PFINWHERE','LONGINT').Value.tu32 := 2;
|
||
|
cl.AddConstantN('PFINKEY','LONGINT').Value.tu32 := 4;
|
||
|
cl.AddConstantN('PFHIDDEN','LONGINT').Value.tu32 :=8;
|
||
|
cl.addTypeS('TPROVIDERFLAGS', 'BYTE');
|
||
|
cl.addTypeS('TFIELDNOTIFYEVENT', 'Procedure ( SENDER : TFIELD)');
|
||
|
cl.addTypeS('TFIELDGETTEXTEVENT', 'Procedure ( SENDER : TFIELD; var TEXT : S'
|
||
|
+'TRING; DISPLAYTEXT : BOOLEAN)');
|
||
|
cl.addTypeS('TFIELDSETTEXTEVENT', 'Procedure ( SENDER : TFIELD; const TEXT :'
|
||
|
+' String)');
|
||
|
cl.addTypeS('TAUTOREFRESHFLAG', '( ARNONE, ARAUTOINC, ARDEFAULT )');
|
||
|
SIRegisterTLOOKUPLIST(Cl);
|
||
|
SIRegisterTFIELD(Cl);
|
||
|
SIRegisterTSTRINGFIELD(Cl);
|
||
|
SIRegisterTWIDESTRINGFIELD(Cl);
|
||
|
SIRegisterTNUMERICFIELD(Cl);
|
||
|
SIRegisterTINTEGERFIELD(Cl);
|
||
|
SIRegisterTSMALLINTFIELD(Cl);
|
||
|
cl.addTypeS('LARGEINT', 'INT64');
|
||
|
SIRegisterTLARGEINTFIELD(Cl);
|
||
|
SIRegisterTWORDFIELD(Cl);
|
||
|
SIRegisterTAUTOINCFIELD(Cl);
|
||
|
SIRegisterTFLOATFIELD(Cl);
|
||
|
SIRegisterTCURRENCYFIELD(Cl);
|
||
|
SIRegisterTBOOLEANFIELD(Cl);
|
||
|
SIRegisterTDATETIMEFIELD(Cl);
|
||
|
SIRegisterTDATEFIELD(Cl);
|
||
|
SIRegisterTTIMEFIELD(Cl);
|
||
|
SIRegisterTBINARYFIELD(Cl);
|
||
|
SIRegisterTBYTESFIELD(Cl);
|
||
|
SIRegisterTVARBYTESFIELD(Cl);
|
||
|
SIRegisterTBCDFIELD(Cl);
|
||
|
{$IFDEF DELPHI6UP}
|
||
|
SIRegisterTFMTBCDFIELD(Cl);
|
||
|
{$ENDIF}
|
||
|
cl.addTypeS('TBLOBTYPE', 'BYTE');
|
||
|
SIRegisterTBLOBFIELD(Cl);
|
||
|
SIRegisterTMEMOFIELD(Cl);
|
||
|
SIRegisterTGRAPHICFIELD(Cl);
|
||
|
SIRegisterTOBJECTFIELD(Cl);
|
||
|
SIRegisterTADTFIELD(Cl);
|
||
|
SIRegisterTARRAYFIELD(Cl);
|
||
|
SIRegisterTDATASETFIELD(Cl);
|
||
|
SIRegisterTREFERENCEFIELD(Cl);
|
||
|
SIRegisterTVARIANTFIELD(Cl);
|
||
|
SIRegisterTGUIDFIELD(Cl);
|
||
|
cl.addTypeS('TBLOBDATA', 'STRING');
|
||
|
cl.AddConstantN('PTUNKNOWN','LONGINT').Value.tu32 := 1;
|
||
|
cl.AddConstantN('PTINPUT','LONGINT').Value.tu32 := 2;
|
||
|
cl.AddConstantN('PTOUTPUT','LONGINT').Value.tu32 := 4;
|
||
|
cl.AddConstantN('PTINPUTOUTPUT','LONGINT').Value.tu32 := 8;
|
||
|
cl.AddConstantN('PTRESULT','LONGINT').Value.tu32 := 16;
|
||
|
RegClassS(cl,'TObject','TPARAMS');
|
||
|
SIRegisterTPARAM(Cl);
|
||
|
SIRegisterTPARAMS(Cl);
|
||
|
cl.addTypeS('TDATAACTION', '( DAFAIL, DAABORT, DARETRY )');
|
||
|
cl.addTypeS('TBLOBSTREAMMODE', '( BMREAD, BMWRITE, BMREADWRITE )');
|
||
|
cl.addTypeS('TDATAOPERATION', 'Procedure');
|
||
|
cl.addTypeS('TDATASETNOTIFYEVENT', 'Procedure ( DATASET : TDATASET)');
|
||
|
cl.addTypeS('TDATASETERROREVENT', 'Procedure ( DATASET : TDATASET; E : TObject'
|
||
|
+'; var ACTION : TDATAACTION)');
|
||
|
cl.addTypeS('TFILTERRECORDEVENT', 'Procedure ( DATASET : TDATASET; var ACCEP'
|
||
|
+'T : BOOLEAN)');
|
||
|
SIRegisterTDATASET(Cl);
|
||
|
end;
|
||
|
|
||
|
{$IFDEF USEIMPORTER}
|
||
|
initialization
|
||
|
CIImporter.AddCallBack(@SIRegister_DB,PT_ClassImport);
|
||
|
{$ENDIF}
|
||
|
end.
|