Units
Classes, Interfaces, Objects
Types
Variables
Constants
Functions, Procedures
Identifiers

Class TExContainerType

Unit

rjExAnsiString2CardinalVector

Declaration

type TExContainerType = class(TAnsiString2Base04ZeroVector)

Description

Base class for TAnsiString2CardinalVector.

Hierarchy

TAnsiString2Base04ZeroVector > TAnsiString2Base04Vector > TAnsiString2Vector > TExContainerType > TAnsiStringBase04ZeroVector > TAnsiStringBase04Vector > TAnsiStringVector > TExContainerType > TBase04ZeroVector > TBase04Vector > TExVector > TExContainer > TErrorObject

Fields

None.

Methods

Overview

function ExistAllNumbers(const ANumbers: array of TExNumberType): Boolean;
function ExistAnyNumbers(const ANumbers: array of TExNumberType): Boolean;
function ExistsBackNumber(const ANumber: TExNumberType): Boolean;
function ExistsNumber(const ANumber: TExNumberType): Boolean;
function ExistsSortedNumber(const Number: TExNumberType): Boolean;
function FindDescNumber(const ANumber: TExNumberType; out Index: Integer): Boolean;
function FindNumber(const Number: TExNumberType; out Index: Integer): Boolean;
function GetFirstNumber: TExNumberType;
function GetLastNumber: TExNumberType;
function GetNameBackOfNumber(const ANumber: TExNumberType): TExNameType;
function GetNameOfNumber(const ANumber: TExNumberType): TExNameType;
function GetNumber(const Item: Pointer): TExNumberType;
function GetNumberAt(const Index: Integer): TExNumberType;
function GetValueBackOfNumber(const ANumber: TExNumberType): TExValueType;
function GetValueOfNumber(const ANumber: TExNumberType): TExValueType;
function IndexBackOfNumber(const ANumber: TExNumberType): Integer;
function IndexOfNumber(const ANumber: TExNumberType): Integer;
function InsertNameNumberLast(const AName: TExNameType; const ANumber: TExNumberType): Integer;
function InsertNameNumberSortedByNameCI(const AName: TExNameType; const ANumber: TExNumberType): Integer;
function InsertNameNumberSortedByNameCS(const AName: TExNameType; const ANumber: TExNumberType): Integer;
function InsertNameValueNumberLast(const AName: TExNameType; const AValue: TExValueType; const ANumber: TExNumberType): Integer;
procedure InsertNumberAt(const Index: Integer; const ANumber: TExNumberType);
function InsertNumberFirst(const Number: TExNumberType): Integer;
function InsertNumberLast(const Number: TExNumberType): Integer;
function InsertNumberSorted(const ANumber: TExNumberType): Integer;
function InsertNumberSortedDesc(const ANumber: TExNumberType): Integer;
function ItemOfNumber(const Number: TExNumberType): Pointer;
procedure RemoveAllNumbers(const ANumber: TExNumberType);
procedure RemoveBackAllNumbers(const ANumber: TExNumberType);
procedure SetFirstNumber(const Number: TExNumberType);
procedure SetLastNumber(const Number: TExNumberType);
procedure SetNameBackOfNumber(const ANumber: TExNumberType; const AName: TExNameType);
procedure SetNameOfNumber(const ANumber: TExNumberType; const AName: TExNameType);
procedure SetNumber(const Item: Pointer; const Number: TExNumberType);
procedure SetNumberAt(const Index: Integer; const Number: TExNumberType);
procedure SetValueBackOfNumber(const ANumber: TExNumberType; const AValue: TExValueType);
procedure SetValueOfNumber(const ANumber: TExNumberType; const AValue: TExValueType);
procedure SortByNumber;
procedure SortByNumberDesc;

Description

function ExistAllNumbers(const ANumbers: array of TExNumberType): Boolean;

Returns True if all of the ANumbers in the array exist in the Items' Number Elements of the container, otherwise returns False. Comparison starts with the first Item.

function ExistAnyNumbers(const ANumbers: array of TExNumberType): Boolean;

Returns True if at least one of the ANumbers in the array exists in the Items' Number Elements of the container, otherwise returns False. Comparison starts with the first Item.

function ExistsBackNumber(const ANumber: TExNumberType): Boolean;

Returns True if ANumber exists among the Items' Number Elements of the container, otherwise returns False. Comparison starts with the last Item.

function ExistsNumber(const ANumber: TExNumberType): Boolean;

Returns True if ANumber exists among the Items' Number Elements of the container, otherwise returns False. Comparison starts with the first Item.

function ExistsSortedNumber(const Number: TExNumberType): Boolean;

 

function FindDescNumber(const ANumber: TExNumberType; out Index: Integer): Boolean;

 

function FindNumber(const Number: TExNumberType; out Index: Integer): Boolean;

 

function GetFirstNumber: TExNumberType;

Returns the Number Element of the first Item in the container.

function GetLastNumber: TExNumberType;

Returns the Number Element of the last Item in the container.

function GetNameBackOfNumber(const ANumber: TExNumberType): TExNameType;

Looks for the last occurrence of an Item whose Number Element is the same as Number. If found, returns the Name Element of that Item. If not found, an empty string is returned.

function GetNameOfNumber(const ANumber: TExNumberType): TExNameType;

Looks for the first occurrence of an Item whose Number Element is the same as Number. If found, returns the Name Element of that Item. If not found, an empty string is returned.

function GetNumber(const Item: Pointer): TExNumberType;

Returns the Number Element of the Item pointed to by Item.

function GetNumberAt(const Index: Integer): TExNumberType;

Returns the Number Element of the Item referenced by a 0-based Index.

function GetValueBackOfNumber(const ANumber: TExNumberType): TExValueType;

Looks for the last occurrence of an Item whose Number Element is the same as Number. If found, returns the Value Element of that Item. If not found, an empty string is returned.

function GetValueOfNumber(const ANumber: TExNumberType): TExValueType;

Looks for the first occurrence of an Item whose Number Element is the same as Number. If found, returns the Value Element of that Item. If not found, an empty string is returned.

function IndexBackOfNumber(const ANumber: TExNumberType): Integer;

Returns the position of the last occurrence of an Item whose Number Element is the same as ANumber. IndexBackOfNumber returns the 0-based Index of the Item, i.e. 0 for the first Item, 1 for the second, and so on. If ANumber is not in the vector, IndexBackOfNumber returns -1.

function IndexOfNumber(const ANumber: TExNumberType): Integer;

Returns the position of the first occurrence of an Item whose Number Element is the same as ANumber. IndexOfNumber returns the 0-based Index of the Item, i.e. 0 for the first Item, 1 for the second, and so on. If ANumber is not in the vector, IndexOfNumber returns -1.

function InsertNameNumberLast(const AName: TExNameType; const ANumber: TExNumberType): Integer;

Inserts a new Item to the end of the vector and stores AName and ANumber to the new Item's Name and Number Elements respectively. InsertNameNumberLast returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0.

function InsertNameNumberSortedByNameCI(const AName: TExNameType; const ANumber: TExNumberType): Integer;

Inserts a new Item at the appropriate position to a vector already sorted by its Items' Name Elements in ascending order. The new position will be based on comparisons with AName. The comparison is case insensitive.

InsertNameNumberSortedByNameCI does not allow duplicates in the vector. If AName is already present in the vector, no new Item will be inserted and AName and ANumber will not be stored.

InsertNameNumberSortedByNameCI returns the Index position of the new Item in the vector, where the first Item i n the vector has an Index of 0. If no new Item has been added (to avoid duplicates), the result will be -1.

function InsertNameNumberSortedByNameCS(const AName: TExNameType; const ANumber: TExNumberType): Integer;

Inserts a new Item at the appropriate position to a vector already sorted by its Items' Name Elements in ascending order. The new position will be based on comparisons with AName. The comparison is case sensitive.

InsertNameNumberSortedByNameCS does not allow duplicates in the vector. If AName is already present in the vector, no new Item will be inserted and AName and ANumber will not be stored.

InsertNameNumberSortedByNameCS returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0. If no new Item has been added (to avoid duplicates), the result will be -1.

function InsertNameValueNumberLast(const AName: TExNameType; const AValue: TExValueType; const ANumber: TExNumberType): Integer;

Inserts a new Item to the end of the vector and stores AName, AValue and ANumber to the new Item's Name, Value and Number Elements respectively. InsertNameValueNumberLast returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0.

procedure InsertNumberAt(const Index: Integer; const ANumber: TExNumberType);

Inserts a new Item at the position specified by Index and stores ANumber to the new Item's Number Element.

function InsertNumberFirst(const Number: TExNumberType): Integer;

Inserts a new Item to the beginning of the vector and stores Number to the new Item's Number Element. InsertNumberFirst returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0.

function InsertNumberLast(const Number: TExNumberType): Integer;

Inserts a new Item to the end of the vector and stores Number to the new Item's Number Element. InsertNumberLast returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0.

function InsertNumberSorted(const ANumber: TExNumberType): Integer;

Inserts a new Item at the appropriate position to a vector already sorted by its Items' Number Elements in ascending order. The new position will be based on comparisons with ANumber.

AddNumberSorted relies on the vector to be in sorted order already; do not use it on unsorted vectors. Call SortByNumber to prepare an unsorted vector for using AddNumberSorted.

AddNumberSorted does not allow duplicates in the vector. If ANumber is already present in the vector, no new Item will be inserted and ANumber will not be stored.

AddNumberSorted returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0. If no new Item has been added (to avoid duplicates), the result will be -1.

function InsertNumberSortedDesc(const ANumber: TExNumberType): Integer;

Inserts a new Item at the appropriate position to a vector already sorted by its Items' Number Elements in descending order. The new position will be based on comparisons with ANumber.

AddNumberSortedDesc relies on the vector to be in sorted order already; do not use it on unsorted vectors. Call SortByNumberDesc to prepare an unsorted vector for using AddNumberSortedDesc.

AddNumberSortedDesc does not allow duplicates in the vector. If ANumber is already present in the vector, no new Item will be inserted and ANumber will not be stored.

AddNumberSortedDesc returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0. If no new Item has been added (to avoid duplicates), the result will be -1.

function ItemOfNumber(const Number: TExNumberType): Pointer;

 

procedure RemoveAllNumbers(const ANumber: TExNumberType);

Removes all Items whose Number Element is the same as ANumber from the container.

procedure RemoveBackAllNumbers(const ANumber: TExNumberType);

Removes all Items whose Number Element is the same as ANumber from the container starting at the last Item.

procedure SetFirstNumber(const Number: TExNumberType);

Stores Number to the Number Element of the first Item in the container.

procedure SetLastNumber(const Number: TExNumberType);

Stores Number to the Number Element of the last Item in the container.

procedure SetNameBackOfNumber(const ANumber: TExNumberType; const AName: TExNameType);

Looks for the last occurrence of an Item whose Number Element is the same as Number. If found, Name is stored to the Name Element of that Item. If not found, Name will not be stored.

procedure SetNameOfNumber(const ANumber: TExNumberType; const AName: TExNameType);

Looks for the first occurrence of an Item whose Number Element is the same as Number. If found, Name is stored to the Name Element of that Item. If not found, Name will not be stored.

procedure SetNumber(const Item: Pointer; const Number: TExNumberType);

Stores Number to the Number Element of the Item pointed to by Item.

procedure SetNumberAt(const Index: Integer; const Number: TExNumberType);

Stores Number to the Number Element of the Item referenced by a 0-based Index.

procedure SetValueBackOfNumber(const ANumber: TExNumberType; const AValue: TExValueType);

Looks for the last occurrence of an Item whose Number Element is the same as Number. If found, Value is stored to the Value Element of that Item. If not found, Value will not be stored.

procedure SetValueOfNumber(const ANumber: TExNumberType; const AValue: TExValueType);

Looks for the first occurrence of an Item whose Number Element is the same as Number. If found, Value is stored to the Value Element of that Item. If not found, Value will not be stored.

procedure SortByNumber;

Sorts all Items in the container by their Number Element in ascending order.

procedure SortByNumberDesc;

Sorts all Items in the container by their Number Element in descending order.

Properties

Overview

FirstNumber: TExNumberType;
LastNumber: TExNumberType;
NameBackOfNumber[const Number: TExNumberType]: TExNameType;
NameOfNumber[const Number: TExNumberType]: TExNameType;
Number[const Item: Pointer]: TExNumberType;
NumberAt[const Index: Integer]: TExNumberType;
ValueBackOfNumber[const Number: TExNumberType]: TExValueType;
ValueOfNumber[const Number: TExNumberType]: TExValueType;

Description

FirstNumber: TExNumberType;

Reads or modifies the Number Element of the first Item in the container.

LastNumber: TExNumberType;

Reads or modifies the Number Element of the last Item in the container.

NameBackOfNumber[const Number: TExNumberType]: TExNameType;

 

NameOfNumber[const Number: TExNumberType]: TExNameType;

 

Number[const Item: Pointer]: TExNumberType;

Reads or writes the Number Element of the Item pointed to by Item.

NumberAt[const Index: Integer]: TExNumberType;

Lists the Number Element of the container's Items, referenced by a 0-based Index. Use Numbers to read or modify the Number Element of an Item at a particular position. Index gives the position of the Item, where 0 is the position of the first Item, 1 is the position of the second Item, and so on.

ValueBackOfNumber[const Number: TExNumberType]: TExValueType;

 

ValueOfNumber[const Number: TExNumberType]: TExValueType;

 


rjExContainer Library Version 0.2.
Copyright Ralf Junker 2000-2001.
http://www.zeitungsjunge.de/delphi/.