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
- TObject
- TList
- TObjectList
- TBaseItems
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. | |
| Protected | procedure Deserialize(const ASource: TStream); virtual; |
|
This item has no description. | |
| Public | constructor Create(const AOwnsObject: Boolean); reintroduce; virtual; |
|
This item has no description. | |
| Public | destructor Destroy; override; |
|
This item has no description. | |
| 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 | |
| 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. | |
| 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); reintroduce; virtual; |
|
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); |
|
This item has no description. | |
| Public | procedure Clear; reintroduce; virtual; |
|
This item has no description. | |
Generated by PasDoc 1.0.2.