type TExContainerType = class(
TAnsiStringBase04ZeroList
)
TAnsiString2List
.TAnsiStringBase04ZeroList
> TAnsiStringBase04List
> TAnsiStringList
> TExContainerType
> TBase04ZeroList
> TBase04List
> TExList
> TExContainer
> TErrorObject
None.
constructor Create; override; |
function ExistAllValuesCS(const AValues: array of TExValueType): Boolean; |
Returns True
if all of the AValues
in the array exist in the Items' Value Elements of the container, otherwise returns False
. Comparison starts with the first Item and is case sensitive.
function ExistAnyValuesCS(const AValues: array of TExValueType): Boolean; |
Returns True
if at least one of the AValues
in the array exists in the Items' Value Elements of the container, otherwise returns False
. Comparison starts with the first Item and is case sensitive.
function ExistsBackFromValueCS(const Item: Pointer; const Value: TExValueType): Boolean; |
function ExistsBackValueCI(const AValue: TExValueType): Boolean; |
Returns True if AValue
exists among the Items' Value Elements of the container, otherwise returns False. Comparison starts with the last Item and is case insensitive.
function ExistsBackValueCS(const AValue: TExValueType): Boolean; |
Returns True if AValue
exists among the Items' Value Elements of the container, otherwise returns False. Comparison starts with the last Item and is case sensitive.
function ExistsFromValueCS(const Item: Pointer; const Value: TExValueType): Boolean; |
function ExistsValueCI(const AValue: TExValueType): Boolean; |
Returns True if AValue
exists among the Items' Value Elements of the container, otherwise returns False. Comparison starts with the first Item and is case insensitive.
function ExistsValueCS(const AValue: TExValueType): Boolean; |
Returns True if AValue
exists among the Items' Value Elements of the container, otherwise returns False. Comparison starts with the first Item and is case sensitive.
function GetFirstValue: TExValueType; |
Returns the Value Element of the first Item in the container.
function GetLastValue: TExValueType; |
Returns the Value Element of the last Item in the container.
function GetNameBackOfValueCI(const AValue: TExValueType): TExNameType; |
Looks for the last occurrence of an Item whose Value Element is the same as Value
. If found, returns the Name Element of that Item. If not found, an empty string is returned.
Comparison of Value
is case insensitive.
function GetNameBackOfValueCS(const AValue: TExValueType): TExNameType; |
Looks for the last occurrence of an Item whose Value Element is the same as Value
. If found, returns the Name Element of that Item. If not found, an empty string is returned.
Comparison of Value
is case sensitive.
function GetNameOfValueCI(const AValue: TExValueType): TExNameType; |
Looks for the first occurrence of an Item whose Value Element is the same as Value
. If found, returns the Name Element of that Item. If not found, an empty string is returned.
Comparison of Value
is case insensitive.
function GetNameOfValueCS(const AValue: TExValueType): TExNameType; |
Looks for the first occurrence of an Item whose Value Element is the same as Value
. If found, returns the Name Element of that Item. If not found, an empty string is returned.
Comparison of Value
is case sensitive.
function GetValue(const Item: Pointer): TExValueType; |
Returns the Value Element of the Item pointed to by Item
.
function GetValueBackOfNameCI(const AName: TExNameType): TExValueType; |
Looks for the last occurrence of an Item whose Name Element is the same as Name
. If found, returns the Value Element of that Item. If not found, an empty string is returned.
Comparison of Name
is case insensitive.
function GetValueBackOfNameCS(const AName: TExNameType): TExValueType; |
Looks for the last occurrence of an Item whose Name Element is the same as Name
. If found, returns the Value Element of that Item. If not found, an empty string is returned.
Comparison of Name
is case sensitive.
function GetValueOfNameCI(const AName: TExNameType): TExValueType; |
Looks for the first occurrence of an Item whose Name Element is the same as Name
. If found, returns the Value Element of that Item. If not found, an empty string is returned.
Comparison of Name
is case insensitive.
function GetValueOfNameCS(const AName: TExNameType): TExValueType; |
Looks for the first occurrence of an Item whose Name Element is the same as Name
. If found, returns the Value Element of that Item. If not found, an empty string is returned.
Comparison of Name
is case sensitive.
function InsertNameValueAfter(const Item: Pointer; const AName: TExNameType; const AValue: TExValueType): Pointer; |
function InsertNameValueBefore(const Item: Pointer; const AName: TExNameType; const AValue: TExValueType): Pointer; |
function InsertNameValueFirst(const AName: TExNameType; const AValue: TExValueType): Pointer; |
function InsertNameValueLast(const AName: TExNameType; const AValue: TExValueType): Pointer; |
function InsertValueAfter(const Item: Pointer; const Value: TExValueType): Pointer; |
function InsertValueBefore(const Item: Pointer; const Value: TExValueType): Pointer; |
function InsertValueFirst(const Value: TExValueType): Pointer; |
function InsertValueLast(const Value: TExValueType): Pointer; |
function ItemBackOfValueCI(const Value: TExValueType): Pointer; |
function ItemBackOfValueCS(const Value: TExValueType): Pointer; |
function ItemOfValueCI(const Value: TExValueType): Pointer; |
function ItemOfValueCS(const Value: TExValueType): Pointer; |
function LoadValuesFromTextFile(const FileName: AnsiString): Boolean; |
Loads the container's Names from a file which can be read and edited as text. Calls LoadFromTextStream to do the actual reading.
function LoadValuesFromTextStream(const Stream: TStream): Boolean; virtual; |
Fills the items' Name Elements with lines of text read from a stream. The text read from the stream is parsed into strings separated by carriage return or linefeed characters.
In contrast to the TStrings' LoadFromStream method, this method does not read the whole stream into memory but starts parsing the lines immediately, using less memory and CPU power.
LoadValuesFromTextStream
first clears the container before loading the Names, so all other Elements will be undefined after calling this function.
procedure RemoveAllValuesCI(const AValue: TExValueType); |
Removes all Items whose Value Element is the same as AValue
from the container. Comparison is case insensitive.
procedure RemoveAllValuesCS(const AValue: TExValueType); |
Removes all Items whose Value Element is the same as AValue
from the container. Comparison is case sensitive.
procedure RemoveBackAllValuesCI(const AValue: TExValueType); |
Removes all Items whose Value Element is the same as AValue
from the container starting at the last Item. Comparison is case insensitive.
procedure RemoveBackAllValuesCS(const AValue: TExValueType); |
Removes all Items whose Value Element is the same as AValue
from the container starting at the last Item. Comparison is case sensitive.
procedure SaveValuesToTextFile(const FileName: AnsiString); |
procedure SaveValuesToTextStream(const Stream: TStream); virtual; |
Writes the Value Elements of all Items in the container to a stream object. The stream format written by this method is compatible with text files. Call SaveValuesToTextStream
to save the Value Elements in the container to the stream specified by the Stream
parameter. SaveValuesToTextStream
writes the Values delimited by carriage return, line feed pairs. If the stream is a file stream, SaveValuesToTextStream
does the same thing as SaveValuesToTextFile
, except the application must create and destroy the file stream.
Use LoadValuesFromTextStream
to read back a stream written by this method.
procedure SetFirstValue(const Value: TExValueType); |
Stores Value
to the Value Element of the first Item in the container.
procedure SetLastValue(const Value: TExValueType); |
Stores Value
to the Value Element of the last Item in the container.
procedure SetNameBackOfValueCI(const AValue: TExValueType; const AName: TExNameType); |
Looks for the last occurrence of an Item whose Value Element is the same as Value
. If found, Name
is stored to the Name Element of that Item. If not found, Name
will not be stored.
Comparison of Value
is case insensitive.
procedure SetNameBackOfValueCS(const AValue: TExValueType; const AName: TExNameType); |
Looks for the last occurrence of an Item whose Value Element is the same as Value
. If found, Name
is stored to the Name Element of that Item. If not found, Name
will not be stored.
Comparison of Value
is case sensitive.
procedure SetNameOfValueCI(const AValue: TExValueType; const AName: TExNameType); |
Looks for the first occurrence of an Item whose Value Element is the same as Value
. If found, Name
is stored to the Name Element of that Item. If not found, Name
will not be stored.
Comparison of Value
is case insensitive.
procedure SetNameOfValueCS(const AValue: TExValueType; const AName: TExNameType); |
Looks for the first occurrence of an Item whose Value Element is the same as Value
. If found, Name
is stored to the Name Element of that Item. If not found, Name
will not be stored.
Comparison of Value
is case sensitive.
procedure SetValue(const Item: Pointer; const Value: TExValueType); |
Stores Value
to the Value Element of the Item pointed to by Item
.
procedure SetValueBackOfNameCI(const AName: TExNameType; const AValue: TExValueType); |
Looks for the last occurrence of an Item whose Name Element is the same as Name
. If found, Value
is stored to the Value Element of that Item. If not found, Value
will not be stored.
Comparison of Name
is case insensitive.
procedure SetValueBackOfNameCS(const AName: TExNameType; const AValue: TExValueType); |
Looks for the last occurrence of an Item whose Name Element is the same as Name
. If found, Value
is stored to the Value Element of that Item. If not found, Value
will not be stored.
Comparison of Name
is case sensitive.
procedure SetValueOfNameCI(const AName: TExNameType; const AValue: TExValueType); |
Looks for the first occurrence of an Item whose Name Element is the same as Name
. If found, Value
is stored to the Value Element of that Item. If not found, Value
will not be stored.
Comparison of Name
is case insensitive.
procedure SetValueOfNameCS(const AName: TExNameType; const AValue: TExValueType); |
Looks for the first occurrence of an Item whose Name Element is the same as Name
. If found, Value
is stored to the Value Element of that Item. If not found, Value
will not be stored.
Comparison of Name
is case sensitive.
procedure SortByValueCI; |
Sorts all Items in the container by their Value Element in ascending order.
The comparison is case insensitive.
procedure SortByValueCIDesc; |
Sorts all Items in the container by their Value Element in descending order.
The comparison is case insensitive.
procedure SortByValueCS; |
Sorts all Items in the container by their Value Element in ascending order.
The comparison is case sensitive.
procedure SortByValueCSDesc; |
Sorts all Items in the container by their Value Element in descending order.
The comparison is case sensitive.
FirstValue: TExValueType; |
LastValue: TExValueType; |
NameBackOfValueCI[const Value: TExValueType]: TExNameType; |
NameBackOfValueCS[const Value: TExValueType]: TExNameType; |
NameOfValueCI[const Value: TExValueType]: TExNameType; |
NameOfValueCS[const Value: TExValueType]: TExNameType; |
Value[const Item: Pointer]: TExValueType; |
ValueBackOfNameCI[const Name: TExNameType]: TExValueType; |
ValueBackOfNameCS[const Name: TExNameType]: TExValueType; |
ValueOfNameCI[const Name: TExNameType]: TExValueType; |
ValueOfNameCS[const Name: TExNameType]: TExValueType; |
FirstValue: TExValueType; |
Reads or modifies the Value Element of the first Item in the container.
LastValue: TExValueType; |
Reads or modifies the Value Element of the last Item in the container.
NameBackOfValueCI[const Value: TExValueType]: TExNameType; |
NameBackOfValueCS[const Value: TExValueType]: TExNameType; |
NameOfValueCI[const Value: TExValueType]: TExNameType; |
NameOfValueCS[const Value: TExValueType]: TExNameType; |
Value[const Item: Pointer]: TExValueType; |
Reads or writes the Value Element of the Item pointed to by Item
.
ValueBackOfNameCI[const Name: TExNameType]: TExValueType; |
ValueBackOfNameCS[const Name: TExNameType]: TExValueType; |
ValueOfNameCI[const Name: TExNameType]: TExValueType; |
ValueOfNameCS[const Name: TExNameType]: TExValueType; |