Class TBaseItems

Unit

Declaration

type TBaseItems = class(TObjectVector)

Description

Container class to store a list of TBaseItems.

Hierarchy

Overview

Methods

Public constructor Create(const AOwnsObject: Boolean); override;
Public destructor Destroy; override;
Public function FindListItem(const AName: string): TBaseItem;
Public procedure InsertItems(const c: TBaseItems);
Public procedure Add(const AObject: TBaseItem);
Public procedure ClearAndAdd(const AObject: TBaseItem);
Public procedure Delete(const AIndex: Integer);
Public procedure Clear; override;

Description

Methods

Public constructor Create(const AOwnsObject: Boolean); override;
 
Public destructor Destroy; override;
 
Public function FindListItem(const AName: string): TBaseItem;

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

In some cases, it 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.

Returns Nil if nothing can be found.

Public procedure InsertItems(const c: TBaseItems);

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

Public procedure Add(const AObject: TBaseItem);

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

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.

Public procedure Delete(const AIndex: Integer);
 
Public procedure Clear; override;
 

Generated by PasDoc 0.16.0.