The Structures unit contains string list objects (similar to TStringList).
The Structures.TSFCList, in fact, descends from TStringList and modifies it to make it more efficient. Also, it adds an owner which can be notified when the list changes. The TSFCFreeList object descends from TSFCList and adds the ability for the list to automatically free the objects when they are deleted from the list (this is similar to the TObjectList in later versions of Delphi).
The Structures.TGStringList is a complete reimplementation of the TStringList building in the efficiencies of TSFCList from the ground up. It adds the memory management of the TSFCFreeList. Finally, it also adds a private Data field so that you may leave the Objects field empty for use by the user. Of course, this list may also be set to manage the memory in the Data field as well.
|
Name
|
Description
|
|
TGCollection
|
Defines a collection base class that can search for an item by its display name and also knows how to assign to TStrings.
Use the IndexOf method to search for a collection item that has a DisplayName equal to the search string.
|
|
TGCollectionItem
|
Defines a TCollectionItem descendant that can refer to other collection items (TGCollectionItem) and notify them when it is destroyed. This class can only notify other TGCollectionItem classes. This class is similar to TComponent, which allows other TComponents to be informed when a component is removed.
|
|
TGStringList
|
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.
|
|
TMaxCountStrings
|
Define a TStrings class that can grow only so much, such as for Recent Files lists. A TMaxCountStrings object will raise an exception when the capacity of the list is exceeded.
Important Note
|
MaxCount should be set before adding strings
|
|
|
TRecentFiles
|
Defines a TStringList class for storing a limited list of recent file names. The list ensures that only one instance of a filename is on the list (i.e., no duplicates).
Use the Push method to add files to the list.
|
|
TSFCFreeList
|
The SFCFreeList class descends from the Structures.TSFCList class. It provides efficient string list functionality with the added benefit of managing the memory in the Object field.
|
|
TSFCList
|
The TSFCList class descends from TStringList and modifies the class to make it more efficient. Also, it adds some helper methods for iterating easily over the list. Finally, it adds an owner which can be notified when the list changes.
The TSFCList class makes the TStringList class more efficient by overriding the Assign and Sort methods. Specifically, Inprise's TStringList does not override the Assign method and can be slow when assigning two sorted TStringLists to each other. The inherited Assign method justs adds the strings from the source object, it doesn't use knowledge about the lists being sorted to not search for the correct place to insert the item into the destination list.
The Structures.TGStringList adds this efficiency (and other improvements). However, the TGStringList is built entirely from scratch so it may be more advantageous to use.
|
|
TSortedCollection
|
Provides a TCollection that can be sorted.
Component users would descend from this class and either assign a OnCompare event handler or override the Compare and IsSortable functions. TCollectionItem descendants would call the SortItem method when the property the collection sorts on is changed
|
Top
|
|
Name
|
Description
|
|
IStringsOwner
|
Defines the interface for an object which may "own" a TSFCList, TSFCFreeList, or TGStringList object. An owner is notified automatically when the string lists are changed (items are added or deleted).
|
Top
|