|
EGHashtableError
|
Represents type EGHashtableError.
|
|
TComponentList<T>
|
Defines a generics-based TComponentList. TComponentList was removed for the NEXTGEN compiler (Contnrs.pas missing) so this class allows for replacing it.
|
|
TObjectStringList<T>
|
Extends the generics-based TStringList<T> for data <T> that are constrained to be classes.
The OwnsData property controls whether the data is freed when the string is deleted.
|
|
TRSAssignList<T>
|
Defines a generic list class that can assign its elements.
Note
|
If this class descended from TObjectList<T>, we would have worries about OwnsObjects=True when copying the list and later emptying, so this list deliberately descends from non-memory managed TList<T>.
|
|
|
TRSDictionary<TKey,TValue>
|
Collection of key-value pairs.
TRSDictionary represents a generic collection of key-value pairs.
This class provides a mapping from a collection of keys to a collection of values. When you create a TRSDictionary object, you can specify various combinations of initial capacity, equality operation, and initial content.
You can add a key that is associated with a corresponding value with the Add or AddOrSetValue methods. You can remove entries with Remove or Clear, which removes all key-value pairs. Adding or removing a key-value pair and looking up a key are efficient, close to O(1), because keys are hashed. A key must not be nil (though a value may be nil) and there must be an equality comparison operation for keys.
You can test for the presence or keys and values with the TryGetValue, ContainsKey and ContainsValue methods.
The Items property lists all Count dictionary entries. You can also set and get values by indexing the Items property. Setting the value this way overwrites any existing value.
Note
|
The TRSDictionary<TKey,TValue> class was created to address problems in the TDictionary class that prevented subclassing from the class. The TRSHashTable<TKey,TValue> needed some changes (as of XE4) in order to properly mimic the older TGHashTable class from RiverSoftAVG:
• moved FItems to protected • moved DoAdd to protected and made it virtual • moved DoSetValue to protected and made it virtual • moved DoRemove to protected and made it virtual • Changed Remove from procedure to function |
|
|
|
TRSDictionary<TKey,TValue>.TKeyCollection
|
TRSDictionary.TKeyCollection is the container class for the collection of keys in the dictionary.
TRSDictionary.TKeyCollection is the container class for the collection of keys in the dictionary.
|
|
TRSDictionary<TKey,TValue>.TKeyEnumerator
|
TRSDictionary.TKeyEnumerator is the enumerator class for the keys in the dictionary.
TRSDictionary.TKeyEnumerator is the class that implements enumerating functionality to the collection of keys in the dictionary.
RSGenerics.Collections.TRSDictionary<TKey,TValue>.TKeyEnumerator.MoveNext focuses on the next key in the collection. Also, RSGenerics.Collections.TRSDictionary<TKey,TValue>.TKeyEnumerator.Current stores the key that is currently focused.
|
|
TRSDictionary<TKey,TValue>.TPairEnumerator
|
TRSDictionary.TPairEnumerator is the enumerator class for the pairs in the dictionary.
TRSDictionary.TPairEnumerator is the class that implements enumerating functionality to the collection of pairs in the dictionary.
RSGenerics.Collections.TRSDictionary<TKey,TValue>.TPairEnumerator.MoveNext focuses on the next pair in the collection. Also, RSGenerics.Collections.TRSDictionary<TKey,TValue>.TPairEnumerator.Current stores the pair that is currently focused.
|
|
TRSDictionary<TKey,TValue>.TValueCollection
|
TRSDictionary.TValueCollection is the container class for the collection of values in the dictionary.
TRSDictionary.TValueCollection is the container class for the collection of values in the dictionary.
|
|
TRSDictionary<TKey,TValue>.TValueEnumerator
|
TRSDictionary.TValueEnumerator is the enumerator class for the Values in the dictionary.
TRSDictionary.TValueEnumerator is the class that implements enumerating functionality to the collection of values in the dictionary.
RSGenerics.Collections.TRSDictionary<TKey,TValue>.TValueEnumerator.MoveNext focuses on the next value in the collection. Also, RSGenerics.Collections.TRSDictionary<TKey,TValue>.TValueEnumerator.Current stores the value that is currently focused.
|
|
TRSEnumerable<T>
|
TRSEnumerable is an abstract class inherited by all RiverSoftAVG enumerable containers.
Note
|
This class is a copy of Embarcadero's TEnumerable class. However, it descends from TPersistent, which allows the containers to be assigned.
|
To give your container enumerating functionality, implement and extend the TRSEnumerable abstract class.
Implement the DoGetEnumerator protected method in order to obtain an instance of the container's enumerator.
Warning
|
This class cannot be used in XE4 or earlier because of generics compiler errors.
|
|
|
TRSHashTable<TKey,TValue>
|
|
|
TRSListEnumerator<T>
|
Enumerator class for TList<T> that can be used as base class for implementing IXXXIterator interfaces from CommonInterfaces.pas
|
|
TRSObjectListEnumerator<T>
|
Enumerator class for TObjectList<T> that can be used as base class for implementing IXXXIterator interfaces from CommonInterfaces.pas
|
|
TRSStringHashTable<TValue>
|
Provides a hash table or dictionary where the keys are strings. This class mimics the TGStringHashTable class using the TRSDictionary<TKey,TValue> generic collection, allowing an easier transition for old code.
Tip
|
You can copy this class (at least the keys) to and from a TStrings object by using the Assign method.
|
Note
|
For a small numbers of items, this class may be slower than a TStringList because its retrieval time constant is larger. It also consumes more memory than a TStringList.
|
|
|
TRSStringHashTable<TValue>.TStringIterator
|
TRSStringHashTable.TStringIterator is the enumerator class for the string keys in the dictionary, that also implements the CommonInterfaces.IStringIterator interface.
TRSStringHashTable.TStringIterator is the class that implements enumerating functionality to the collection of string keys in the dictionary.
The IStringIterator interface is similar to an Enumeration in java.
To use the iterator is simple, get the iterator and then keep calling the RSGenerics.Collections.TRSStringHashTable<TValue>.TStringIterator.NextElement method until the RSGenerics.Collections.TRSStringHashTable<TValue>.TStringIterator.HasMoreElements method returns False. The iterator works by giving you the next element until the end of the list, there is no provision for getting the previous element.
|
|
TRSStringObjectHashTable<T>
|
Provides a hash table or dictionary where the keys are strings and the values are class types. This class mimics the TGStringHashTable class using the TRSDictionary<TKey,TValue> generic collection, allowing an easier transition for old code.
Tip
|
You can copy this class to and from a TStrings object by using the Assign method.
|
Note
|
For a small numbers of items, this class may be slower than a TStringList because its retrieval time constant is larger. It also consumes more memory than a TStringList.
|
|
|
TRSStringObjectHashTable<T>.TObjectIterator
|
TRSStringObjectHashTable.TObjectIterator is the enumerator class for the string keys in the dictionary, that also implements the CommonInterfaces.IObjectIterator interface.
TRSStringObjectHashTable.TObjectIterator is the class that implements enumerating functionality to the collection of value objects in the dictionary.
The IObjectIterator interface is similar to an Enumeration in java.
To use the iterator is simple, get the iterator and then keep calling the RSGenerics.Collections.TRSStringObjectHashTable<T>.TObjectIterator.NextElement method until the RSGenerics.Collections.TRSStringObjectHashTable<T>.TObjectIterator.HasMoreElements method returns False. The iterator works by giving you the next element until the end of the list, there is no provision for getting the previous element.
|
|
TStringList<T>
|
Defines a generics-based TStrings implementation that can privately store an extra item (determined by <T>) in the Data field for each Item in the TStrings list.
The RSGenerics.Collections.TStringList<T>.OwnsObjects property controls whether the TStringList<T> automatically frees its associated Objects.
Many controls in Delphi (such as FMX TListBox) have a TStrings interface and an associated items interface (e.g., ListItems). Maintaining two lists are inefficient. RiverSoftAVG gets around this limitation by using this class, the generics version of a TStrings.
Important Note
|
It is highly recommended that you use the TObjectStringList class if the associated item <T> is to be a TObject or descendant. The TObjectStringList class will maintain and even optionally free the associated item for you.
|
Note
|
This class is intended to replace TGStringList and TIStringList classes from older RiverSoftAVG code in newer versions (XE4+) of Delphi.
|
Warning
|
This class cannot be used in XE4 or earlier because of generics compiler errors.
|
|
|
TStringList<T>.TValueCollection
|
Container class for the collection of data values in the string list.
|
|
TStringList<T>.TValueEnumerator
|
Enumerator to enumerate through the associated data of the list.
|