forked from project-jedi/jvcl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJvAppStorage.dtx
1864 lines (1669 loc) · 77.4 KB
/
JvAppStorage.dtx
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
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
##Package: Core
##Status: Completed, Incomplete
----------------------------------------------------------------------------------------------------
@@JvAppStorage.pas
Summary
Contains the interface and generic implemention for the storage backend.
Author
Marcel Bestebroer
----------------------------------------------------------------------------------------------------
@@TSynchronizeMethod
<TITLE TSynchronizeMethod type>
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.UseOldItemNameFormat
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.StoreStringListAsSingleString
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.TypedIntegerAsString
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.SetAsString
Summary
Specifies whether to store a set as string.
Description
Write here a description
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.StoreDefaultValues
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.DefaultTrueString
Summary
Write here a summary (1 line)
Description
Write here a description
Return value
Describe here what the function returns
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.EnumerationAsString
Summary
Specifies whether to store an enumeration as string.
Description
Write here a description
See Also
TJvCustomAppStorage.ReadEnumeration, TJvCustomAppStorage.WriteEnumeration
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.FloatAsString
Summary
Specifies whether to store a float as string.
Description
Write here a description
See Also
TJvCustomAppStorage.ReadFloat, TJvCustomAppStorage.WriteFloat
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.IsValueFalseString
Summary
Write here a summary (1 line)
Description
Write here a description
Parameters
Value - Description for this parameter
Return value
Describe here what the function returns
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.IsValueListString
Summary
Write here a summary (1 line)
Description
This is a protected member, you don't have to describe these
Parameters
AValue - Description for this parameter
AList - Description for this parameter
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.IsValueTrueString
Summary
Write here a summary (1 line)
Description
Write here a description
Parameters
Value - Description for this parameter
Return value
Describe here what the function returns
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.DefaultFalseString
Summary
Write here a summary (1 line)
Description
Write here a description
Return value
Describe here what the function returns
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.DefaultIfReadConvertError
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.DefaultIfValueNotExists
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteString
Summary
Stores a string value.
Description
WriteString will store the specified string value in the specified location.
Parameters
Path - Path (relative to the current path) where the value is to be stored.
Value - Value to store.
See Also
TJvCustomAppStorage.ReadString, TJvCustomAppStorage.WriteBinary, TJvCustomAppStorage.WriteDateTime,
TJvCustomAppStorage.WriteFloat, TJvCustomAppStorage.WriteInteger, TJvCustomAppStorage.WriteList,
TJvCustomAppStorage.WriteStringList
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteStringList
Summary
Stores a list of strings.
Description
WriteStringList stores a list of strings in the storage. WriteStringList uses the WriteList method in combination with specialized OnWriteItem and OnDeleteItems handlers that will write the individual items from the list in the storage an
remove excessive items. Items are stored in the <B>Item<I>x</I></B> format where <I>x</I> is the
0-based index of the item.
Parameters
Path - Path (relative to the current path) where the strings are to be stored.
SL - String list to store.
ItemName - Prefix of the sub path for the items.
See Also
TJvCustomAppStorage.ReadStringList, TJvCustomAppStorage.WriteBinary,
TJvCustomAppStorage.WriteDateTime, TJvCustomAppStorage.WriteFloat, TJvCustomAppStorage.WriteInteger,
TJvCustomAppStorage.WriteList, TJvCustomAppStorage.WriteString
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteStringObjectList
Summary
Stores a list of strings.
Description
Write here a description
Parameters
Path - Path (relative to the current path) where the value is to be stored.
SL - String list to store.
ItemName - Prefix of the sub path for the items.
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteWideString
Summary
Write here a summary (1 line)
Description
Write here a description
Parameters
Path - Description for this parameter
Value - Description for this parameter
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.DateTimeAsString
Summary
Specifies whether to store a datetime value as string.
Description
Write here a description
See Also
TJvCustomAppStorage.ReadDateTime, TJvCustomAppStorage.WriteDateTime
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.BooleanStringTrueValues
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.BooleanStringFalseValues
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions
Summary
Write here a summary (1 line)
Description
Write here a description
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorageOptions.BooleanAsString
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteObjectList
Summary
Stores a list of objects.
Description
Call WriteObjectList to stores a list of objects. Uses WriteList with internally provided methods
to do the actual storing.
Parameters
Path - Path (relative to the current path) where the value is to be stored.
List - Value to store.
ItemName - Prefix of the sub path for the items.
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WritePersistent
Summary
Stores a TPersistent-Object with all of its published properties.
Description
Write here a description
Parameters
Path - Path (relative to the current path) where the value is to be stored.
PersObj - Object to store.
Recursive - Description for this parameter
IgnoreProperties - Description for this parameter
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteProperty
Summary
Stores a property.
Description
Write here a description
Parameters
Path - Path (relative to the current path) where the value is to be stored.
PersObj - Description for this parameter
PropName - Description for this parameter
Recursive - Description for this parameter
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteSet
Summary
Stores a set (ignores sub stores).
Description
Write here a description
<CODE>
type
TTest = (tstValue1, tstValue2, tstValue3);
TTestSet = set of TTest;
uses
TypInfo;
function TForm1.ReadTestSet: TTestSet;
begin
Result := [];
JvAppIniFileStorage1.ReadSet('SomePath', TypeInfo(TTestSet), Result, Result);
end;
procedure TForm1.WriteTestSet(const ATestSet: TTestSet);
begin
JvAppIniFileStorage1.WriteSet('SomePath', TypeInfo(TTestSet), ATestSet);
end; </CODE>
Parameters
Path - Path (relative to the current path) where the value is to be stored.
ATypeInfo - A typeinfo pointer that describes the type of the Value parameter.
Value - Value to store.
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteInteger
Summary
Stores an integer value.
Description
WriteInteger will store the specified integer value in the specified location.
Parameters
Path - Path (relative to the current path) where the value is to be stored.
Value - Value to store.
See Also
TJvCustomAppStorage.ReadInteger, TJvCustomAppStorage.WriteBinary, TJvCustomAppStorage.WriteDateTime,
TJvCustomAppStorage.WriteFloat, TJvCustomAppStorage.WriteList, TJvCustomAppStorage.WriteString,
TJvCustomAppStorage.WriteStringList
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteList
Summary
Stores a list of items.
Description
WriteList stores a list of items in the storage.
WriteList is a general purpose method that can store any list by means of the provided write method.
The specified write method will be called for each item individually, specifying the list path and
the item index to store. The method should write the item (which can be as simple as writing a
single value to as complex as writing an entire group of values and/or sub lists).
The specified delete method is called to clear out the remaining part of the list that is no longer
to be stored (i.e. overwriting a larger list with a smaller list). The method is called only once,
specifying the range of items to be removed. The method should then remove said items from the
storage.
Parameters
Path - Path (relative to the current path) where the list is to be stored.
List - Value to store.
ItemCount - Number of items to store.
OnWriteItem - Method that will write each item to the storage.
OnDeleteItems - Method that will remove remaining items from a previous list.
ItemName - Prefix of the sub path for the items.
See Also
TJvCustomAppStorage.ReadList, TJvCustomAppStorage.WriteBinary, TJvCustomAppStorage.WriteDateTime,
TJvCustomAppStorage.WriteFloat, TJvCustomAppStorage.WriteInteger, TJvCustomAppStorage.WriteString,
TJvCustomAppStorage.WriteStringList
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteFloat
Summary
Stores a floating point value.
Description
WriteFloat will store the specified floating point value in the specified location.
Parameters
Path - Path (relative to the current path) where the value is to be stored.
Value - Value to store.
See Also
TJvCustomAppStorage.ReadFloat, TJvCustomAppStorage.WriteBinary, TJvCustomAppStorage.WriteDateTime,
TJvCustomAppStorage.WriteInteger, TJvCustomAppStorage.WriteList, TJvCustomAppStorage.WriteString,
TJvCustomAppStorage.WriteStringList
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteDateTime
Summary
Stores a date and time value.
Description
WriteDateTime will store the specified date and time value in the specified location.
Parameters
Path - Path (relative to the current path) where the value is to be stored.
Value - Value to store.
See Also
TJvCustomAppStorage.ReadDateTime, TJvCustomAppStorage.WriteBinary, TJvCustomAppStorage.WriteFloat,
TJvCustomAppStorage.WriteInteger, TJvCustomAppStorage.WriteList, TJvCustomAppStorage.WriteString,
TJvCustomAppStorage.WriteStringList
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteEnumeration
Summary
Write here a summary (1 line)
Description
Write here a description
Parameters
Path - Path (relative to the current path) where the value is to be stored.
TypeInfo - A typeinfo pointer that describes the type of the Value parameter.
Value - Value to store.
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.TranslateStringEngine
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ValueStored
Summary
Determines if the specified path is a value.
Description
ValueStored determines if the specified path is a value that is stored in the storage. If the path
does not point to a value ValueStored returns False, otherwise True will be returned.
Parameters
Path - Path (relative to the current path) to check.
See Also
TJvCustomAppStorage.IsFolder, TJvCustomAppStorage.ListStored
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteBinary
Summary
Stores the buffer in a binary form.
Description
WriteBinary will write BufSize bytes of the buffer indicated by Buf to the storage in a binary form.
Parameters
Path - Path (relative to the current path) where the value is to be stored.
Buf - Data to write to the storage.
BufSize - Size of the buffer.
See Also
TJvCustomAppStorage.ReadBinary, TJvCustomAppStorage.WriteDateTime, TJvCustomAppStorage.WriteFloat,
TJvCustomAppStorage.WriteInteger, TJvCustomAppStorage.WriteList, TJvCustomAppStorage.WriteString,
TJvCustomAppStorage.WriteStringList
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteBoolean
Summary
Stores a Boolean value.
Description
Stores a Boolean value. The value is stored as string TRUE/FALSE.
Parameters
Path - Path (relative to the current path) where the value is to be stored.
Value - Value to store.
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.WriteCollection
Summary
Stores a collection.
Description
Call WriteCollection to store a collection in the specified location.
Parameters
Path - Path (relative to the current path) where the value is to be stored.
List - Value to store.
ItemName - Prefix of the sub path for the items.
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.TranslatePropertyName
Summary
Write here a summary (1 line)
Description
Translates between a property name and its storage name. If Reading is True, AName is interpreted
as a storage name to be translated to a real property name. If Reading is False, AName is
interpreted as
a property name to be translated to a storage name. Will invoke the OnTranslatePropertyName event
if one is assigned, or return AName if no handler is assigned.
Parameters
Instance - Description for this parameter
AName - Description for this parameter
Reading - Description for this parameter
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.StorageOptions
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.SubStorages
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.SynchronizeFlushReload
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.Root
Summary
Specifies absolute root.
Description
Root specifies the absolute root for the storage. It's primarily used for storages that are not
application specific (like the registry) to determine the exact path under which all other values
and folders will be located.
In contrast to the Path property, none of the methods are allowed to specify levels above this
path, nor any siblings of this path.
See Also
TJvCustomAppStorage.Path
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReloadNeeded
Summary
Write here a summary (1 line)
Description
Write here a description
Return value
Describe here what the function returns
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ResolvePath
Summary
Resolves the specified path to a target storage and target path.
Description
ResolvePath will resolve the specified path into a storage backend and path to use. The storage
returned might be itself, one of its sub stores or a sub store at an even deeper level. In any
case, the returned store and path will no longer reference to any other sub store.
ResolvePath will take the specified path, prefixing it with the currently set path and canonicalize
it (making it relative to the absolute root of the storage).
It will then scan the sub storages to see if the path refers to a linked storage. If it doesn't,
this storage will be returned as the target store and the canonicalized path as the target path.
If it did find a sub store, the link path is removed from the canonical path (making it relative to
the absolute root of the sub store) and ResolvePath is executed on the sub store. Eventually the
sub store to use and the path relative to the absolute root of that store are returned.
Parameters
InPath - The path to resolve. This may be any path specification, even one that's relative to
the currently selected path.
TargetStore - The target store to use. The returned store is guaranteed to be the store that should
contain the specified path (ie. it can not reference any of its linked sub stores).
TargetPath - The path to use in the target store. The returned path is always canonical and
relative to the absolute root of the target store specified by TgtStore and will
reference the path specified by InPath.
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadWideString
Summary
Write here a summary (1 line)
Description
Write here a description
Parameters
Path - Description for this parameter
Default - Description for this parameter
Return value
Describe here what the function returns
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.Reload
Summary
Reloads the data in memory file from the file indicated by FileName.
Description
Call Reload to explicitly load the data in memory file from the file indicated by FileName.
See Also
TJvCustomAppStorage.Flush
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReloadIfNeeded
Summary
Write here a summary (1 line)
Description
Write here a description
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadStringObjectList@string@TStrings@Boolean@string
Summary
Reads a string list with addition objects.
Description
Retrieves a string list with addition objects. The ObjectType of the Object is retrieved from the
stored "Classname" value. The string list is optionally cleared before reading starts. The result
value is the number of items read. Uses ReadList with internally provided methods to do the actual
reading.
Parameters
Path - Description for this parameter
SL - Description for this parameter
ClearFirst - Description for this parameter
ItemName - Prefix of the sub path for the items.
ItemCreator - Description for this parameter
See Also
TJvCustomAppStorage.WriteStringObjectList
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadStringObjectList@string@TStrings@TJvAppStorageObjectListItemCreateEvent@Boolean@string
<COMBINE TJvCustomAppStorage.ReadStringObjectList@string@TStrings@Boolean@string>
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadStringList
Summary
Reads a list of strings.
Description
ReadStringList reads a list of strings from the storage. ReadStringList uses the ReadList method in combination with a specialized OnReadItem handler that will read the individual items in from
the list. Items are expected to be stored in the <B>Item<I>x</I></B> format where <I>x</I> is the
0-based index of the item.
The returned value is the number of strings read.
Parameters
Path - \Path (relative to the current path) of the value to read.
SL - String list in which to store the strings from the storage.
ClearFirst - Flag to indicate if the string list should be cleared before reading commences.
ItemName - Prefix of the sub path for the items.
See Also
TJvCustomAppStorage.ReadBinary, TJvCustomAppStorage.ReadDateTime, TJvCustomAppStorage.ReadFloat,
TJvCustomAppStorage.ReadInteger, TJvCustomAppStorage.ReadList, TJvCustomAppStorage.ReadString,
TJvCustomAppStorage.WriteStringList
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadString
Summary
Reads a string value.
Description
ReadString reads a string value from the storage. The result value is the value in the storage or
the specified default value if it did not exist in the storage.
Parameters
Path - \Path (relative to the current path) of the value to read.
Default - Value to return if the specified path does not exist.
See Also
TJvCustomAppStorage.ReadBinary, TJvCustomAppStorage.ReadDateTime, TJvCustomAppStorage.ReadFloat,
TJvCustomAppStorage.ReadInteger, TJvCustomAppStorage.ReadList, TJvCustomAppStorage.ReadStringList,
TJvCustomAppStorage.WriteString
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadProperty
Summary
Reads a property.
Description
Call ReadProperty to retrieve a property. If the value is not found, the property is not changed.
Parameters
Path - \Path (relative to the current path) of the value to read.
PersObj - Description for this parameter
PropName - Description for this parameter
Recursive - Description for this parameter
ClearFirst - Description for this parameter
See Also
TJvCustomAppStorage.WriteProperty
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadSet
Summary
Reads a set.
Description
Call ReadSet to retrieve a set. If the value is not found, the Default will be returned.
Parameters
Path - \Path (relative to the current path) of the value to read.
ATypeInfo - A typeinfo pointer that describes the type of the value to be read.
Default - Value to return if the specified path does not exist.
Value - Returns the retrieved value.
See Also
TJvCustomAppStorage.WriteSet
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadPersistent
Summary
Reads a TPersistent-Object with all of its published properties.
Description
Call ReadPersistent to retrieve a TPersistent-Object with all of its published properties.
Parameters
Path - \Path (relative to the current path) of the value to read.
PersObj - Description for this parameter
Recursive - Description for this parameter
ClearFirst - Description for this parameter
IgnoreProperties - Description for this parameter
See Also
TJvCustomAppStorage.WritePersistent
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadObjectList@string@TList@TJvAppStorageObjectListItemCreateEvent@Boolean@string
<COMBINE TJvCustomAppStorage.ReadObjectList@string@TList@Boolean@string>
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadOnly
Summary
Write here a summary (1 line)
Description
Defines if the Storage-Component is read-only or not. If ReadOnly is true all Calls to an
Write*-Procedure will be ignored. The property is calculated by a combination of setting the
property
ReadOnly and Result of the function GetPhysicalReadOnly
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadObjectList@string@TList@Boolean@string
Summary
Retrieves a list of objects.
Description
Retrieves a list of objects. The list is optionally cleared before before reading starts.
When ReadObjectList is called with no ItemCreater parameter, the ObjectType of the Object is retrieved from
the stored "Classname" value. Otherwise, the ObjectType of the Object is defined by the
ItemCreator-Event.
The result value is the number of items read. Uses ReadList with internally provided methods to do
the actual reading.
Parameters
Path - \Path (relative to the current path) of the value to read.
List - Specifies the TList descendant to hold the retrieved objects.
ClearFirst - Indicates whether to clear the List parameter first.
ItemName - Prefix of the sub path for the items.
ItemCreator - Method that will create each item.
See Also
TJvCustomAppStorage.ReadList
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadList
Summary
Reads a list of items.
Description
ReadList reads a list of items from the storage. The result value is the number of items in the
list or 0 if the list does not exist in the storage.
ReadList is a general purpose method that can read any list by means of the provided read method.
The specified method will be called for each item individually, specifying the list path and the
item index to read. The method should read the item (which can be as simple as reading in a single
value to as complex as reading in an entire group of values and/or sub lists) and process the data
immediately (e.g. store it in memory or display it in a control).
Parameters
Path - \Path (relative to the current path) of the value to read.
List - Parameter passed to the OnReadItem event.
OnReadItem - Method that will read each item from the storage.
ItemName - Parameter passed to the OnReadItem event.
See Also
TJvCustomAppStorage.ReadBinary, TJvCustomAppStorage.ReadDateTime, TJvCustomAppStorage.ReadFloat,
TJvCustomAppStorage.ReadInteger, TJvCustomAppStorage.ReadString, TJvCustomAppStorage.ReadStringList,
TJvCustomAppStorage.WriteList
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadBinary
Summary
Reads a binary value.
Description
ReadBinary reads a value from the storage in a binary form. The method will read at most BufSize
bytes and put it in the location pointed to by Buf. The result value indicates the number of bytes
actually read.
Parameters
Path - \Path (relative to the current path) of the value to read.
Buf - Buffer in which to put the data read.
BufSize - Size of the buffer. ReadBinary will return at most BufSize bytes.
See Also
TJvCustomAppStorage.ReadDateTime, TJvCustomAppStorage.ReadFloat, TJvCustomAppStorage.ReadInteger,
TJvCustomAppStorage.ReadList, TJvCustomAppStorage.ReadString, TJvCustomAppStorage.ReadStringList,
TJvCustomAppStorage.WriteBinary
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadBoolean
Summary
Write here a summary (1 line)
Description
Write here a description
Parameters
Path - \Path (relative to the current path) of the value to read.
Default - Value to return if the specified path does not exist.
See Also
TJvCustomAppStorage.WriteBoolean
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadCollection
Summary
Write here a summary (1 line)
Description
Write here a description
Parameters
Path - \Path (relative to the current path) of the value to read.
List - Description for this parameter
ClearFirst - Description for this parameter
ItemName - Prefix of the sub path for the items.
See Also
TJvCustomAppStorage.WriteCollection
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadDateTime
Summary
Reads a TDateTime value.
Description
ReadDateTime reads date and time value from the storage. The result value is the value in the
storage or the specified default value if it did not exist in the storage.
Parameters
Path - \Path (relative to the current path) of the value to read.
Default - Value to return if the specified path does not exist.
See Also
TJvCustomAppStorage.ReadBinary, TJvCustomAppStorage.ReadFloat, TJvCustomAppStorage.ReadInteger,
TJvCustomAppStorage.ReadList, TJvCustomAppStorage.ReadString, TJvCustomAppStorage.ReadStringList,
TJvCustomAppStorage.WriteDateTime
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadEnumeration
Summary
Reads an enumeration value.
Description
Retrieves an enumeration. If the value is not found, the Default will be returned.
Parameters
Path - \Path (relative to the current path) of the value to read.
TypeInfo - A typeinfo pointer that describes the type of the data to be read.
Default - Value to return if the specified path does not exist.
Value - Returns the retrieved value.
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadFloat
Summary
Reads a floating point value.
Description
ReadFloat reads a floating point value from the storage. The result value is the value in the
storage or the specified default value if it did not exist in the storage.
If the value is not an Extended (or can't be converted to an Extended an EConvertError exception
will be raised.
Parameters
Path - \Path (relative to the current path) of the value to read.
Default - Value to return if the specified path does not exist.
See Also
TJvCustomAppStorage.ReadBinary, TJvCustomAppStorage.ReadDateTime, TJvCustomAppStorage.ReadInteger,
TJvCustomAppStorage.ReadList, TJvCustomAppStorage.ReadString, TJvCustomAppStorage.ReadStringList,
TJvCustomAppStorage.WriteFloat
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.ReadInteger
Summary
Reads an integer value.
Description
ReadInteger reads an integer value from the storage. The result value is the value in the storage
or the specified default value if it did not exist in the storage.
If the value is not an Integer (or can't be converted to an Integer an EConvertError exception will
be raised.
Parameters
Path - \Path (relative to the current path) of the value to read.
Default - Value to return if the specified path does not exist.
See Also
TJvCustomAppStorage.ReadBinary, TJvCustomAppStorage.ReadDateTime, TJvCustomAppStorage.ReadFloat,
TJvCustomAppStorage.ReadList, TJvCustomAppStorage.ReadString, TJvCustomAppStorage.ReadStringList,
TJvCustomAppStorage.WriteInteger
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.Path
Summary
Specifies the current path.
Description
Path specified the current path. This paths is prepended to any of the accessing methods to
determine the actual path. It can be used to simplify code dealing with storages. By setting the
base path to use you can minimize the paths used in the calls to the Read* or Write* methods to sub
folders.
Note that this path is relative to the absolute storage root specified by the Root property.
See Also
TJvCustomAppStorage.Root
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.PathExists
Summary
Determines if the specified path exists.
Description
PathExists determines if the specified path exists.
Parameters
Path - Path (relative to the current path) to check.
Return value
True if the path exists, otherwise false.
See Also
TJvCustomAppStorage.ValueStored
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.OnEncryptPropertyValue
Summary
Occurs when a string value needs to be encrypted.
Description
Write an OnEncryptPropertyValue event handler to encryt values that are to be stored in the storage.
See Also
TJvAppStorageCryptEvent, TJvCustomAppStorage.OnDecryptPropertyValue
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.OnError
Summary
Write here a summary (1 line)
Description
Write here a description
Parameters
Sender - Description for this parameter
Value - Description for this parameter
See Also
List here other properties, methods (comma seperated)
Remove the 'See Also' section if there are no references
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.OnTranslatePropertyName
Summary
Event to translate the names under which the values were stored with the backend engine.
Description
This event can be used to translate the names under which the values were stored in the backend
engine. For example: Storing a published property object property "Custo" can be translated to
"Customer Number", which is more readable.
Sample:
<CODE>
procedure TForm2.OptionsRegistryStorageTranslatePropertyName(
Sender: TJvCustomAppStorage; Instance: TPersistent; var Name: String;
const Reading: Boolean);
begin
if Name = 'DevNameEdit_Text' then
Name := 'Developer_Name'
else if Name = 'MyNameEdit_Text' then
Name := 'My_Name'
else if Name = 'BoolCheckBox_Checked' then
Name := 'This_Is_Boolean'
else if Name = 'IntUpDown_Position' then
Name := 'This_Is_Integer';
end; </CODE>
Parameters
Sender - AppStorage Instance
Instance - Instance of the Parent object which is stored
Name - Name to be translated. The changed name is given back in the same parameter
Reading - Flag if the appstorage instance is reading or writing in this moment. This flag is
mainly for information. It has no change on the implementation.
See Also
TJvAppStoragePropTranslateEvent
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.OnDecryptPropertyValue
Summary
Occurs when a string value needs to be decrypted.
Description
Write an OnDecryptPropertyValue event handler to decrypt values that are read from the storage.
See Also
TJvAppStorageCryptEvent, TJvCustomAppStorage.OnEncryptPropertyValue
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.IsFolder
Summary
Determines if the specified path is a folder.
Description
IsFolder determines if the specified path refers to a folder or a value. The specified path is
considered to be a folder if:
* It has sub folders or values
* ListIsValue is False or if it's True the path does not refer to a list (a folder is considered a
list if it contains the Count value and only Item<I>x</I> values; if it contains other values as
well it's considered to be a folder and a value).
If the specified path refers to a folder IsFolder returns True, otherwise False is returned.
Parameters
Path - Path (relative to the current path) to check.
ListIsValue - Flag to interpret a list as value or not.
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.IsPropertyValueCryptEnabled
Summary
Indicates whether the encryption/decryption of values is enabled.
Description
Read IsPropertyValueCryptEnabled to determine whether encryption/decryption of string values is
enabled.
When IsPropertyValueCryptEnabled is true, the storage component triggers an OnEncryptPropertyValue
event for each string value it writes to the storage, and an OnDecryptPropertyValue event for each
string value it reads from the storage.
See Also
TJvCustomAppStorage.EnablePropertyValueCrypt, TJvCustomAppStorage.DisablePropertyValueCrypt
----------------------------------------------------------------------------------------------------
@@TJvCustomAppStorage.IsUpdating
Summary
Write here a summary (1 line)
Description
Write here a description