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

Class TExContainerType

Unit

rjExWideStringList

Declaration

type TExContainerType = class(TBase04ZeroList)

Description

Base class for TWideStringList.

Hierarchy

TBase04ZeroList > TBase04List > TExList > TExContainer > TErrorObject

Fields

None.

Methods

Overview

constructor Create; override;
function ExistAllNamesCS(const ANames: array of TExNameType): Boolean;
function ExistAnyNamesCS(const ANames: array of TExNameType): Boolean;
function ExistsBackFromNameCS(const Item: Pointer; const Name: TExNameType): Boolean;
function ExistsBackNameCI(const AName: TExNameType): Boolean;
function ExistsBackNameCS(const AName: TExNameType): Boolean;
function ExistsFromNameCS(const Item: Pointer; const Name: TExNameType): Boolean;
function ExistsNameCI(const AName: TExNameType): Boolean;
function ExistsNameCS(const AName: TExNameType): Boolean;
function GetFirstName: TExNameType;
function GetLastName: TExNameType;
function GetName(const Item: Pointer): TExNameType;
function InsertNameAfter(const Item: Pointer; const Name: TExNameType): Pointer;
function InsertNameBefore(const Item: Pointer; const Name: TExNameType): Pointer;
function InsertNameFirst(const Name: TExNameType): Pointer;
function InsertNameLast(const Name: TExNameType): Pointer;
function ItemBackOfNameCI(const Name: TExNameType): Pointer;
function ItemBackOfNameCS(const Name: TExNameType): Pointer;
function ItemOfNameCI(const Name: TExNameType): Pointer;
function ItemOfNameCS(const Name: TExNameType): Pointer;
function LoadFromStream(const Stream: TStream): Boolean; override;
procedure RemoveAllNamesCI(const AName: TExNameType);
procedure RemoveAllNamesCS(const AName: TExNameType);
procedure RemoveBackAllNamesCI(const AName: TExNameType);
procedure RemoveBackAllNamesCS(const AName: TExNameType);
procedure SaveNamesToTextFile(const FileName: AnsiString);
procedure SaveNamesToTextStream(const Stream: TStream); virtual;
procedure SaveToStream(const Stream: TStream); override;
procedure SetFirstName(const Name: TExNameType);
procedure SetLastName(const Name: TExNameType);
procedure SetName(const Item: Pointer; const Name: TExNameType);
procedure SortByNameCI;
procedure SortByNameCIDesc;
procedure SortByNameCS;
procedure SortByNameCSDesc;

Description

constructor Create; override;

 

function ExistAllNamesCS(const ANames: array of TExNameType): Boolean;

Returns True if all of the ANames in the array exist in the Items' Name Elements of the container, otherwise returns False. Comparison starts with the first Item and is case sensitive.

function ExistAnyNamesCS(const ANames: array of TExNameType): Boolean;

Returns True if at least one of the ANames in the array exists in the Items' Name Elements of the container, otherwise returns False. Comparison starts with the first Item and is case sensitive.

function ExistsBackFromNameCS(const Item: Pointer; const Name: TExNameType): Boolean;

 

function ExistsBackNameCI(const AName: TExNameType): Boolean;

Returns True if AName exists among the Items' Name Elements of the container, otherwise returns False. Comparison starts with the last Item and is case insensitive.

function ExistsBackNameCS(const AName: TExNameType): Boolean;

Returns True if AName exists among the Items' Name Elements of the container, otherwise returns False. Comparison starts with the last Item and is case sensitive.

function ExistsFromNameCS(const Item: Pointer; const Name: TExNameType): Boolean;

 

function ExistsNameCI(const AName: TExNameType): Boolean;

Returns True if AName exists among the Items' Name Elements of the container, otherwise returns False. Comparison starts with the first Item and is case insensitive.

function ExistsNameCS(const AName: TExNameType): Boolean;

Returns True if AName exists among the Items' Name Elements of the container, otherwise returns False. Comparison starts with the first Item and is case sensitive.

function GetFirstName: TExNameType;

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

function GetLastName: TExNameType;

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

function GetName(const Item: Pointer): TExNameType;

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

function InsertNameAfter(const Item: Pointer; const Name: TExNameType): Pointer;

 

function InsertNameBefore(const Item: Pointer; const Name: TExNameType): Pointer;

 

function InsertNameFirst(const Name: TExNameType): Pointer;

 

function InsertNameLast(const Name: TExNameType): Pointer;

 

function ItemBackOfNameCI(const Name: TExNameType): Pointer;

 

function ItemBackOfNameCS(const Name: TExNameType): Pointer;

 

function ItemOfNameCI(const Name: TExNameType): Pointer;

 

function ItemOfNameCS(const Name: TExNameType): Pointer;

 

function LoadFromStream(const Stream: TStream): Boolean; override;

Loads the container's Names from a binary stream. If ItemSize is bigger than that of an WideString, all additional elements are loaded as raw binary data as they were save with SaveToStream. This stream format is not compatible with text files. To load the names from a text file compatible stream, use LoadFromTextStream.

procedure RemoveAllNamesCI(const AName: TExNameType);

Removes all Items whose Name Element is the same as AName from the container. Comparison is case insensitive.

procedure RemoveAllNamesCS(const AName: TExNameType);

Removes all Items whose Name Element is the same as AName from the container. Comparison is case sensitive.

procedure RemoveBackAllNamesCI(const AName: TExNameType);

Removes all Items whose Name Element is the same as AName from the container starting at the last Item. Comparison is case insensitive.

procedure RemoveBackAllNamesCS(const AName: TExNameType);

Removes all Items whose Name Element is the same as AName from the container starting at the last Item. Comparison is case sensitive.

procedure SaveNamesToTextFile(const FileName: AnsiString);

 

procedure SaveNamesToTextStream(const Stream: TStream); virtual;

Writes the Name Elements of all Items in the container to a stream object. The stream format written by this method is compatible with unicode text files. Call SaveNamesToTextStream to save the Name Elements in the container to the stream specified by the Stream parameter. SaveNamesToTextStream writes the Names delimited by carriage return, line feed pairs. If the stream is a file stream, SaveNamesToTextStream does the same thing as SaveNamesToTextFile, except the application must create and destroy the file stream.

procedure SaveToStream(const Stream: TStream); override;

Writes the Name Elements of all Items to a stream object. SaveToStream writes a binary stream format which is not compatible with text files. For writing to a text file compatible stream, use SaveToTextStream instead.

Use LoadFromStream to read back a stream written by this method.

See also: SaveToFile, LoadFromFile.

procedure SetFirstName(const Name: TExNameType);

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

procedure SetLastName(const Name: TExNameType);

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

procedure SetName(const Item: Pointer; const Name: TExNameType);

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

procedure SortByNameCI;

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

The comparison is case insensitive.

procedure SortByNameCIDesc;

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

The comparison is case insensitive.

procedure SortByNameCS;

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

The comparison is case sensitive.

procedure SortByNameCSDesc;

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

The comparison is case insensitive.

Properties

Overview

FirstName: TExNameType;
LastName: TExNameType;
Name[const Item: Pointer]: TExNameType;

Description

FirstName: TExNameType;

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

LastName: TExNameType;

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

Name[const Item: Pointer]: TExNameType;

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


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