-
Notifications
You must be signed in to change notification settings - Fork 0
/
uPSI_Registry.pas
478 lines (436 loc) · 23.7 KB
/
uPSI_Registry.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
unit uPSI_Registry;
{
This file has been generated by UnitParser v0.4b, written by M. Knight
and updated by NP. v/d Spek.
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
}
interface
uses
SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime;
type
(*----------------------------------------------------------------------------*)
TPSImport_Registry = class(TPSPlugin)
protected
procedure CompOnUses(CompExec: TPSScript); override;
procedure ExecOnUses(CompExec: TPSScript); override;
procedure CompileImport1(CompExec: TPSScript); override;
procedure CompileImport2(CompExec: TPSScript); override;
procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
procedure ExecImport2(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
end;
implementation
uses
Windows ,IniFiles ,Registry ;
(* === compile-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure SIRegister_TRegistryIniFile(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCustomIniFile', 'TRegistryIniFile') do
with CL.AddClassN(CL.FindClass('TCustomIniFile'),'TRegistryIniFile') do
begin
RegisterMethod('Constructor Create( const FileName : string);');
RegisterMethod('Constructor CreateA( const FileName : string; AAccess : LongWord);');
RegisterProperty('RegIniFile', 'TRegIniFile', iptr);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TRegIniFile(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TRegistry', 'TRegIniFile') do
with CL.AddClassN(CL.FindClass('TRegistry'),'TRegIniFile') do
begin
RegisterMethod('Constructor Create( const FileName : string);');
RegisterMethod('Constructor CreateA( const FileName : string; AAccess : LongWord);');
RegisterMethod('Function ReadString( const Section, Ident, Default : string) : string');
RegisterMethod('Function ReadInteger( const Section, Ident : string; Default : Longint) : Longint');
RegisterMethod('Procedure WriteInteger( const Section, Ident : string; Value : Longint)');
RegisterMethod('Procedure WriteString( const Section, Ident, Value : String)');
RegisterMethod('Function ReadBool( const Section, Ident : string; Default : Boolean) : Boolean');
RegisterMethod('Procedure WriteBool( const Section, Ident : string; Value : Boolean)');
RegisterMethod('Procedure ReadSection( const Section : string; Strings : TStrings)');
RegisterMethod('Procedure ReadSections( Strings : TStrings)');
RegisterMethod('Procedure ReadSectionValues( const Section : string; Strings : TStrings)');
RegisterMethod('Procedure EraseSection( const Section : string)');
RegisterMethod('Procedure DeleteKey( const Section, Ident : String)');
RegisterProperty('FileName', 'string', iptr);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TRegistry(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TObject', 'TRegistry') do
with CL.AddClassN(CL.FindClass('TObject'),'TRegistry') do
begin
RegisterMethod('Constructor Create;');
RegisterMethod('Constructor CreateA( AAccess : LongWord);');
RegisterMethod('Procedure CloseKey');
RegisterMethod('Function CreateKey( const Key : string) : Boolean');
RegisterMethod('Function DeleteKey( const Key : string) : Boolean');
RegisterMethod('Function DeleteValue( const Name : string) : Boolean');
RegisterMethod('Function GetDataInfo( const ValueName : string; var Value : TRegDataInfo) : Boolean');
RegisterMethod('Function GetDataSize( const ValueName : string) : Integer');
RegisterMethod('Function GetDataType( const ValueName : string) : TRegDataType');
RegisterMethod('Function GetKeyInfo( var Value : TRegKeyInfo) : Boolean');
RegisterMethod('Procedure GetKeyNames( Strings : TStrings)');
RegisterMethod('Procedure GetValueNames( Strings : TStrings)');
RegisterMethod('Function HasSubKeys : Boolean');
RegisterMethod('Function KeyExists( const Key : string) : Boolean');
RegisterMethod('Function LoadKey( const Key, FileName : string) : Boolean');
RegisterMethod('Procedure MoveKey( const OldName, NewName : string; Delete : Boolean)');
RegisterMethod('Function OpenKey( const Key : string; CanCreate : Boolean) : Boolean');
RegisterMethod('Function OpenKeyReadOnly( const Key : String) : Boolean');
RegisterMethod('Function ReadCurrency( const Name : string) : Currency');
RegisterMethod('Function ReadBool( const Name : string) : Boolean');
RegisterMethod('Function ReadDate( const Name : string) : TDateTime');
RegisterMethod('Function ReadDateTime( const Name : string) : TDateTime');
RegisterMethod('Function ReadFloat( const Name : string) : Double');
RegisterMethod('Function ReadInteger( const Name : string) : Integer');
RegisterMethod('Function ReadString( const Name : string) : string');
RegisterMethod('Function ReadTime( const Name : string) : TDateTime');
RegisterMethod('Function RegistryConnect( const UNCName : string) : Boolean');
RegisterMethod('Procedure RenameValue( const OldName, NewName : string)');
RegisterMethod('Function ReplaceKey( const Key, FileName, BackUpFileName : string) : Boolean');
RegisterMethod('Function RestoreKey( const Key, FileName : string) : Boolean');
RegisterMethod('Function SaveKey( const Key, FileName : string) : Boolean');
RegisterMethod('Function UnLoadKey( const Key : string) : Boolean');
RegisterMethod('Function ValueExists( const Name : string) : Boolean');
RegisterMethod('Procedure WriteCurrency( const Name : string; Value : Currency)');
RegisterMethod('Procedure WriteBool( const Name : string; Value : Boolean)');
RegisterMethod('Procedure WriteDate( const Name : string; Value : TDateTime)');
RegisterMethod('Procedure WriteDateTime( const Name : string; Value : TDateTime)');
RegisterMethod('Procedure WriteFloat( const Name : string; Value : Double)');
RegisterMethod('Procedure WriteInteger( const Name : string; Value : Integer)');
RegisterMethod('Procedure WriteString( const Name, Value : string)');
RegisterMethod('Procedure WriteExpandString( const Name, Value : string)');
RegisterMethod('Procedure WriteTime( const Name : string; Value : TDateTime)');
RegisterProperty('CurrentKey', 'HKEY', iptr);
RegisterProperty('CurrentPath', 'string', iptr);
RegisterProperty('LazyWrite', 'Boolean', iptrw);
RegisterProperty('RootKey', 'HKEY', iptrw);
RegisterProperty('Access', 'LongWord', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_Registry(CL: TPSPascalCompiler);
begin
CL.AddClassN(CL.FindClass('TOBJECT'),'ERegistryException');
SIRegister_TRegistry(CL);
SIRegister_TRegIniFile(CL);
SIRegister_TRegistryIniFile(CL);
end;
(* === run-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure TRegistryIniFileRegIniFile_R(Self: TRegistryIniFile; var T: TRegIniFile);
begin T := Self.RegIniFile; end;
(*----------------------------------------------------------------------------*)
Function TRegistryIniFileCreateA_P(Self: TClass; CreateNewInstance: Boolean; const FileName : string; AAccess : LongWord):TObject;
Begin Result := TRegistryIniFile.Create(FileName, AAccess); END;
(*----------------------------------------------------------------------------*)
Function TRegistryIniFileCreate_P(Self: TClass; CreateNewInstance: Boolean; const FileName : string):TObject;
Begin Result := TRegistryIniFile.Create(FileName); END;
(*----------------------------------------------------------------------------*)
procedure TRegIniFileFileName_R(Self: TRegIniFile; var T: string);
begin T := Self.FileName; end;
(*----------------------------------------------------------------------------*)
Function TRegIniFileCreateA_P(Self: TClass; CreateNewInstance: Boolean; const FileName : string; AAccess : LongWord):TObject;
Begin Result := TRegIniFile.Create(FileName, AAccess); END;
(*----------------------------------------------------------------------------*)
Function TRegIniFileCreate_P(Self: TClass; CreateNewInstance: Boolean; const FileName : string):TObject;
Begin Result := TRegIniFile.Create(FileName); END;
(*----------------------------------------------------------------------------*)
procedure TRegistryAccess_W(Self: TRegistry; const T: LongWord);
begin Self.Access := T; end;
(*----------------------------------------------------------------------------*)
procedure TRegistryAccess_R(Self: TRegistry; var T: LongWord);
begin T := Self.Access; end;
(*----------------------------------------------------------------------------*)
procedure TRegistryRootKey_W(Self: TRegistry; const T: HKEY);
begin Self.RootKey := T; end;
(*----------------------------------------------------------------------------*)
procedure TRegistryRootKey_R(Self: TRegistry; var T: HKEY);
begin T := Self.RootKey; end;
(*----------------------------------------------------------------------------*)
procedure TRegistryLazyWrite_W(Self: TRegistry; const T: Boolean);
begin Self.LazyWrite := T; end;
(*----------------------------------------------------------------------------*)
procedure TRegistryLazyWrite_R(Self: TRegistry; var T: Boolean);
begin T := Self.LazyWrite; end;
(*----------------------------------------------------------------------------*)
procedure TRegistryCurrentPath_R(Self: TRegistry; var T: string);
begin T := Self.CurrentPath; end;
(*----------------------------------------------------------------------------*)
procedure TRegistryCurrentKey_R(Self: TRegistry; var T: HKEY);
begin T := Self.CurrentKey; end;
(*----------------------------------------------------------------------------*)
Function TRegistryCreateA_P(Self: TClass; CreateNewInstance: Boolean; AAccess : LongWord):TObject;
Begin Result := TRegistry.Create(AAccess); END;
(*----------------------------------------------------------------------------*)
Function TRegistryCreate_P(Self: TClass; CreateNewInstance: Boolean):TObject;
Begin Result := TRegistry.Create; END;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TRegistryIniFile(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TRegistryIniFile) do
begin
RegisterConstructor(@TRegistryIniFileCreate_P, 'Create');
RegisterConstructor(@TRegistryIniFileCreateA_P, 'CreateA');
RegisterPropertyHelper(@TRegistryIniFileRegIniFile_R,nil,'RegIniFile');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TRegIniFile(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TRegIniFile) do
begin
RegisterConstructor(@TRegIniFileCreate_P, 'Create');
RegisterConstructor(@TRegIniFileCreateA_P, 'CreateA');
RegisterMethod(@TRegIniFile.ReadString, 'ReadString');
RegisterMethod(@TRegIniFile.ReadInteger, 'ReadInteger');
RegisterMethod(@TRegIniFile.WriteInteger, 'WriteInteger');
RegisterMethod(@TRegIniFile.WriteString, 'WriteString');
RegisterMethod(@TRegIniFile.ReadBool, 'ReadBool');
RegisterMethod(@TRegIniFile.WriteBool, 'WriteBool');
RegisterMethod(@TRegIniFile.ReadSection, 'ReadSection');
RegisterMethod(@TRegIniFile.ReadSections, 'ReadSections');
RegisterMethod(@TRegIniFile.ReadSectionValues, 'ReadSectionValues');
RegisterMethod(@TRegIniFile.EraseSection, 'EraseSection');
RegisterMethod(@TRegIniFile.DeleteKey, 'DeleteKey');
RegisterPropertyHelper(@TRegIniFileFileName_R,nil,'FileName');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TRegistry(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TRegistry) do
begin
RegisterConstructor(@TRegistryCreateA_P, 'CreateA');
RegisterConstructor(@TRegistryCreate_P, 'Create');
RegisterMethod(@TRegistry.CloseKey, 'CloseKey');
RegisterMethod(@TRegistry.CreateKey, 'CreateKey');
RegisterMethod(@TRegistry.DeleteKey, 'DeleteKey');
RegisterMethod(@TRegistry.DeleteValue, 'DeleteValue');
RegisterMethod(@TRegistry.GetDataInfo, 'GetDataInfo');
RegisterMethod(@TRegistry.GetDataSize, 'GetDataSize');
RegisterMethod(@TRegistry.GetDataType, 'GetDataType');
RegisterMethod(@TRegistry.GetKeyInfo, 'GetKeyInfo');
RegisterMethod(@TRegistry.GetKeyNames, 'GetKeyNames');
RegisterMethod(@TRegistry.GetValueNames, 'GetValueNames');
RegisterMethod(@TRegistry.HasSubKeys, 'HasSubKeys');
RegisterMethod(@TRegistry.KeyExists, 'KeyExists');
RegisterMethod(@TRegistry.LoadKey, 'LoadKey');
RegisterMethod(@TRegistry.MoveKey, 'MoveKey');
RegisterMethod(@TRegistry.OpenKey, 'OpenKey');
RegisterMethod(@TRegistry.OpenKeyReadOnly, 'OpenKeyReadOnly');
RegisterMethod(@TRegistry.ReadCurrency, 'ReadCurrency');
RegisterMethod(@TRegistry.ReadBool, 'ReadBool');
RegisterMethod(@TRegistry.ReadDate, 'ReadDate');
RegisterMethod(@TRegistry.ReadDateTime, 'ReadDateTime');
RegisterMethod(@TRegistry.ReadFloat, 'ReadFloat');
RegisterMethod(@TRegistry.ReadInteger, 'ReadInteger');
RegisterMethod(@TRegistry.ReadString, 'ReadString');
RegisterMethod(@TRegistry.ReadTime, 'ReadTime');
RegisterMethod(@TRegistry.RegistryConnect, 'RegistryConnect');
RegisterMethod(@TRegistry.RenameValue, 'RenameValue');
RegisterMethod(@TRegistry.ReplaceKey, 'ReplaceKey');
RegisterMethod(@TRegistry.RestoreKey, 'RestoreKey');
RegisterMethod(@TRegistry.SaveKey, 'SaveKey');
RegisterMethod(@TRegistry.UnLoadKey, 'UnLoadKey');
RegisterMethod(@TRegistry.ValueExists, 'ValueExists');
RegisterMethod(@TRegistry.WriteCurrency, 'WriteCurrency');
RegisterMethod(@TRegistry.WriteBool, 'WriteBool');
RegisterMethod(@TRegistry.WriteDate, 'WriteDate');
RegisterMethod(@TRegistry.WriteDateTime, 'WriteDateTime');
RegisterMethod(@TRegistry.WriteFloat, 'WriteFloat');
RegisterMethod(@TRegistry.WriteInteger, 'WriteInteger');
RegisterMethod(@TRegistry.WriteString, 'WriteString');
RegisterMethod(@TRegistry.WriteExpandString, 'WriteExpandString');
RegisterMethod(@TRegistry.WriteTime, 'WriteTime');
RegisterPropertyHelper(@TRegistryCurrentKey_R,nil,'CurrentKey');
RegisterPropertyHelper(@TRegistryCurrentPath_R,nil,'CurrentPath');
RegisterPropertyHelper(@TRegistryLazyWrite_R,@TRegistryLazyWrite_W,'LazyWrite');
RegisterPropertyHelper(@TRegistryRootKey_R,@TRegistryRootKey_W,'RootKey');
RegisterPropertyHelper(@TRegistryAccess_R,@TRegistryAccess_W,'Access');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_Registry(CL: TPSRuntimeClassImporter);
begin
with CL.Add(ERegistryException) do
RIRegister_TRegistry(CL);
RIRegister_TRegIniFile(CL);
RIRegister_TRegistryIniFile(CL);
end;
(* === compile-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure SIRegister_TMemIniFile(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCustomIniFile', 'TMemIniFile') do
with CL.AddClassN(CL.FindClass('TCustomIniFile'),'TMemIniFile') do
begin
RegisterMethod('Constructor Create( const FileName : string)');
RegisterMethod('Procedure Clear');
RegisterMethod('Procedure GetStrings( List : TStrings)');
RegisterMethod('Procedure Rename( const FileName : string; Reload : Boolean)');
RegisterMethod('Procedure SetStrings( List : TStrings)');
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIniFile(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCustomIniFile', 'TIniFile') do
with CL.AddClassN(CL.FindClass('TCustomIniFile'),'TIniFile') do
begin
RegisterMethod('Function ReadString( const Section, Ident, Default : string) : string');
RegisterMethod('Procedure WriteString( const Section, Ident, Value : String)');
RegisterMethod('Procedure ReadSection( const Section : string; Strings : TStrings)');
RegisterMethod('Procedure ReadSections( Strings : TStrings)');
RegisterMethod('Procedure ReadSectionValues( const Section : string; Strings : TStrings)');
RegisterMethod('Procedure EraseSection( const Section : string)');
RegisterMethod('Procedure DeleteKey( const Section, Ident : String)');
RegisterMethod('Procedure UpdateFile');
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TCustomIniFile(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TObject', 'TCustomIniFile') do
with CL.AddClassN(CL.FindClass('TObject'),'TCustomIniFile') do
begin
RegisterMethod('Constructor Create( const FileName : string)');
RegisterMethod('Function SectionExists( const Section : string) : Boolean');
// RegisterMethod('Function ReadString( const Section, Ident, Default : string) : string');
// RegisterMethod('Procedure WriteString( const Section, Ident, Value : String)');
RegisterMethod('Function ReadInteger( const Section, Ident : string; Default : Longint) : Longint');
RegisterMethod('Procedure WriteInteger( const Section, Ident : string; Value : Longint)');
RegisterMethod('Function ReadBool( const Section, Ident : string; Default : Boolean) : Boolean');
RegisterMethod('Procedure WriteBool( const Section, Ident : string; Value : Boolean)');
RegisterMethod('Function ReadDate( const Section, Name : string; Default : TDateTime) : TDateTime');
RegisterMethod('Function ReadDateTime( const Section, Name : string; Default : TDateTime) : TDateTime');
RegisterMethod('Function ReadFloat( const Section, Name : string; Default : Double) : Double');
RegisterMethod('Function ReadTime( const Section, Name : string; Default : TDateTime) : TDateTime');
RegisterMethod('Procedure WriteDate( const Section, Name : string; Value : TDateTime)');
RegisterMethod('Procedure WriteDateTime( const Section, Name : string; Value : TDateTime)');
RegisterMethod('Procedure WriteFloat( const Section, Name : string; Value : Double)');
RegisterMethod('Procedure WriteTime( const Section, Name : string; Value : TDateTime)');
// RegisterMethod('Procedure ReadSection( const Section : string; Strings : TStrings)');
// RegisterMethod('Procedure ReadSections( Strings : TStrings)');
// RegisterMethod('Procedure ReadSectionValues( const Section : string; Strings : TStrings)');
// RegisterMethod('Procedure EraseSection( const Section : string)');
// RegisterMethod('Procedure DeleteKey( const Section, Ident : String)');
// RegisterMethod('Procedure UpdateFile');
RegisterMethod('Function ValueExists( const Section, Ident : string) : Boolean');
RegisterProperty('FileName', 'string', iptr);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_IniFiles(CL: TPSPascalCompiler);
begin
SIRegister_TCustomIniFile(CL);
SIRegister_TIniFile(CL);
SIRegister_TMemIniFile(CL);
end;
(* === run-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure TCustomIniFileFileName_R(Self: TCustomIniFile; var T: string);
begin T := Self.FileName; end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TMemIniFile(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TMemIniFile) do
begin
RegisterConstructor(@TMemIniFile.Create, 'Create');
RegisterMethod(@TMemIniFile.Clear, 'Clear');
RegisterMethod(@TMemIniFile.GetStrings, 'GetStrings');
RegisterMethod(@TMemIniFile.Rename, 'Rename');
RegisterMethod(@TMemIniFile.SetStrings, 'SetStrings');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIniFile(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIniFile) do
begin
RegisterMethod(@TIniFile.ReadString, 'ReadString');
RegisterMethod(@TIniFile.WriteString, 'WriteString');
RegisterMethod(@TIniFile.ReadSection, 'ReadSection');
RegisterMethod(@TIniFile.ReadSections, 'ReadSections');
RegisterMethod(@TIniFile.ReadSectionValues, 'ReadSectionValues');
RegisterMethod(@TIniFile.EraseSection, 'EraseSection');
RegisterMethod(@TIniFile.DeleteKey, 'DeleteKey');
RegisterMethod(@TIniFile.UpdateFile, 'UpdateFile');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TCustomIniFile(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TCustomIniFile) do
begin
RegisterConstructor(@TCustomIniFile.Create, 'Create');
RegisterMethod(@TCustomIniFile.SectionExists, 'SectionExists');
// RegisterVirtualAbstractMethod(@TCustomIniFile, @!.ReadString, 'ReadString');
// RegisterVirtualAbstractMethod(@TCustomIniFile, @!.WriteString, 'WriteString');
RegisterVirtualMethod(@TCustomIniFile.ReadInteger, 'ReadInteger');
RegisterVirtualMethod(@TCustomIniFile.WriteInteger, 'WriteInteger');
RegisterVirtualMethod(@TCustomIniFile.ReadBool, 'ReadBool');
RegisterVirtualMethod(@TCustomIniFile.WriteBool, 'WriteBool');
RegisterVirtualMethod(@TCustomIniFile.ReadDate, 'ReadDate');
RegisterVirtualMethod(@TCustomIniFile.ReadDateTime, 'ReadDateTime');
RegisterVirtualMethod(@TCustomIniFile.ReadFloat, 'ReadFloat');
RegisterVirtualMethod(@TCustomIniFile.ReadTime, 'ReadTime');
RegisterVirtualMethod(@TCustomIniFile.WriteDate, 'WriteDate');
RegisterVirtualMethod(@TCustomIniFile.WriteDateTime, 'WriteDateTime');
RegisterVirtualMethod(@TCustomIniFile.WriteFloat, 'WriteFloat');
RegisterVirtualMethod(@TCustomIniFile.WriteTime, 'WriteTime');
// RegisterVirtualAbstractMethod(@TCustomIniFile, @!.ReadSection, 'ReadSection');
// RegisterVirtualAbstractMethod(@TCustomIniFile, @!.ReadSections, 'ReadSections');
// RegisterVirtualAbstractMethod(@TCustomIniFile, @!.ReadSectionValues, 'ReadSectionValues');
// RegisterVirtualAbstractMethod(@TCustomIniFile, @!.EraseSection, 'EraseSection');
// RegisterVirtualAbstractMethod(@TCustomIniFile, @!.DeleteKey, 'DeleteKey');
// RegisterVirtualAbstractMethod(@TCustomIniFile, @!.UpdateFile, 'UpdateFile');
RegisterMethod(@TCustomIniFile.ValueExists, 'ValueExists');
RegisterPropertyHelper(@TCustomIniFileFileName_R,nil,'FileName');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_IniFiles(CL: TPSRuntimeClassImporter);
begin
RIRegister_TCustomIniFile(CL);
RIRegister_TIniFile(CL);
RIRegister_TMemIniFile(CL);
end;
{ TPSImport_Registry }
(*----------------------------------------------------------------------------*)
procedure TPSImport_Registry.CompOnUses(CompExec: TPSScript);
begin
{ nothing }
end;
(*----------------------------------------------------------------------------*)
procedure TPSImport_Registry.ExecOnUses(CompExec: TPSScript);
begin
{ nothing }
end;
(*----------------------------------------------------------------------------*)
procedure TPSImport_Registry.CompileImport1(CompExec: TPSScript);
begin
SIRegister_Registry(CompExec.Comp);
SIRegister_IniFiles(CompExec.Comp);
end;
(*----------------------------------------------------------------------------*)
procedure TPSImport_Registry.CompileImport2(CompExec: TPSScript);
begin
{ nothing }
end;
(*----------------------------------------------------------------------------*)
procedure TPSImport_Registry.ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter);
begin
RIRegister_Registry(ri);
RIRegister_IniFiles(ri);
end;
(*----------------------------------------------------------------------------*)
procedure TPSImport_Registry.ExecImport2(CompExec: TPSScript; const ri: TPSRuntimeClassImporter);
begin
{ nothing }
end;
end.