Class TBaseItems

Unit

Declaration

type TBaseItems = class(specialize TObjectList<TBaseItem>)

Description

Container class to store a list of TBaseItems.

Source: source/component/PasDoc_Items.pas (line 1159).

Hierarchy

Show Additional Members:

Overview

Methods

Protected procedure Serialize(const ADestination: TStream); virtual;
Protected procedure Deserialize(const ASource: TStream); virtual;
Public constructor Create(const AOwnsObject: Boolean); reintroduce; virtual;
Public destructor Destroy; override;
Public function FindListItem(const ASignature: string): TBaseItem;
Public function FindListItemIndex(const ASignature: string): Integer;
Public procedure InsertItems(const c: TBaseItems);
Public procedure Add(const AObject: TBaseItem); reintroduce; virtual;
Public procedure ClearAndAdd(const AObject: TBaseItem);
Public procedure Delete(const AIndex: Integer);
Public procedure Clear; reintroduce; virtual;

Description

Methods

Protected procedure Serialize(const ADestination: TStream); virtual;

This item has no description.

Source: source/component/PasDoc_Items.pas (line 1163).

Protected procedure Deserialize(const ASource: TStream); virtual;

This item has no description.

Source: source/component/PasDoc_Items.pas (line 1164).

Public constructor Create(const AOwnsObject: Boolean); reintroduce; virtual;

This item has no description.

Source: source/component/PasDoc_Items.pas (line 1166).

Public destructor Destroy; override;

This item has no description.

Source: source/component/PasDoc_Items.pas (line 1167).

Public function FindListItem(const ASignature: string): TBaseItem;

Find a given item on a list, comparing the Signature. In the base class (TBaseItems), this simply searches the items (not recursively).

In case of some descendants, this is obscured by FindListItem definitions that may look within the items (recursively), when the identifiers inside the item are in same namespace as the items themselves. Example: it will look also inside enumerated types members, because (when "scoped enums" are off) the enumerated members are in the same namespace as the enumerated type name.

TODO: Note that this is not virtual, so using it with instance declared as TBaseItems will always perform non-recursive search. This should be cleaned up: it's probably actually good that this is non-virtual method doing non-recursive search, and descendants should just invent new names instead of obscuring this.

Returns Nil if nothing can be found.

Source: source/component/PasDoc_Items.pas (line 1187).

Public function FindListItemIndex(const ASignature: string): Integer;

Find a given item on a list, comparing the Signature, returning the index. Returns -1 if nothing can be found. This guarantees to work like FindListItem just returns an index.

Source: source/component/PasDoc_Items.pas (line 1192).

Public procedure InsertItems(const c: TBaseItems);

Inserts all items of C into this collection. Disposes C and sets it to nil.

Source: source/component/PasDoc_Items.pas (line 1196).

Public procedure Add(const AObject: TBaseItem); reintroduce; virtual;

During Add, AObject is associated with AObject.Name using hash table, so remember to set AObject.Name before calling Add(AObject).

Source: source/component/PasDoc_Items.pas (line 1200).

Public procedure ClearAndAdd(const AObject: TBaseItem);

This is a shortcut for doing Clear and then Add(AObject). Useful when you want the list to contain exactly the one given AObject.

Source: source/component/PasDoc_Items.pas (line 1205).

Public procedure Delete(const AIndex: Integer);

This item has no description.

Source: source/component/PasDoc_Items.pas (line 1207).

Public procedure Clear; reintroduce; virtual;

This item has no description.

Source: source/component/PasDoc_Items.pas (line 1208).


Generated by PasDoc 1.0.2.