The TGStringList class is a complete reimplementation of the TStringList, building in the efficiencies of Structures.TSFCList as well as adding conveniences of its own. It adds the memory management of the TSFCFreeList, e.g., it can free the associated objects automatically if you want to. It allows sorting and searching case sensitive or non-case sensitive, using Windows locale information or not. The TStringList class uses a case insensitive Locale based search and sort, while this is the most general case, it is also the slowest. Finally, it also adds a private Data field so that you may leave the Objects field empty for use by the user and store your own private data in the Data property. The
Data property is not part of the TStrings base class. As such, it is perfect for associating your data with the strings without worrying about the user inadvertently stomping on it. Of course, the TGStringList may also be set to manage the memory in the Data property as well.
Namespace: Structures
TStrings |
Delphi |
type |
|
|
||||||||||||||||||||||||||||||||||||||||||||||
Controls whether the string list frees the objects inside the Data property when an item is deleted (or the list is cleared). |
||||||||||||||||||||||||||||||||||||||||||||||
Controls whether the string list frees the objects inside the Objects property when an item is deleted (or the list is cleared). |
||||||||||||||||||||||||||||||||||||||||||||||
Occurs when the string list changes |
||||||||||||||||||||||||||||||||||||||||||||||
Occurs when the string list is about to change |
||||||||||||||||||||||||||||||||||||||||||||||
Specifies the Owner of this object. Whenever the list changes, the list will notify the Owner through this interface. |
||||||||||||||||||||||||||||||||||||||||||||||
Specifies whether the strings in the list should be automatically sorted. Set Sorted to True to cause the strings in the list to be automatically sorted in ascending order. Set Sorted to False to allow strings to remain where they are inserted. When Sorted is False, the strings in the list can be put in ascending order at any time by calling the Sort method. When Sorted is True, do not use Insert to add strings to the list. Instead, use Add, which will insert the new strings in the appropriate position. When Sorted is False, use Insert to add strings to an arbitrary position in the list, or Add to add strings to the end of the list. By default, the list is not sorted.
|
||||||||||||||||||||||||||||||||||||||||||||||
Controls how the string list is sorted when the Sort method is called or the Sorted property is set to True. By default, the StringOpsType is soCaseInsensitiveLocale. |
|
|
Reference•Structures.TGStringList.Data[Integer] •TStringList<T> |