-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuPSC_DB.pas
892 lines (837 loc) · 35 KB
/
uPSC_DB.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
{ 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:
[email protected] 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.