Class TPasRoutines

Unit

Declaration

type TPasRoutines = class(TPasItems)

Description

Collection of methods.

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

Hierarchy

Show Additional Members:

Overview

Methods

Public function FindListItemIndex(const ASignature: string): Integer;
Public procedure InsertItems(const c: TBaseItems);
Public procedure ClearAndAdd(const AObject: TBaseItem);
Public procedure Delete(const AIndex: Integer);
Public procedure Clear; reintroduce; virtual;
Public procedure CopyItems(const c: TPasItems);
Public procedure SortDeep(const SortSettings: TSortSettings);
Public procedure SortOnlyInsideItems(const SortSettings: TSortSettings);
Public procedure SortShallow(const Unqualified: Boolean = false);
Public procedure SetFullDeclaration(PrefixName: boolean; const Suffix: string);
Protected procedure Serialize(const ADestination: TStream); override;
Protected procedure Deserialize(const ASource: TStream); override;
Public function FindListItem(const AName: string; Index: Integer): TPasRoutine; overload;
Public function FindListItem(const ANameOrSignature: string): TPasRoutine; overload;
Public procedure Add(const AItem: TBaseItem); override;
Public constructor Create(const AOwnsObject: Boolean); override;
Public destructor Destroy; override;

Properties

Public property PasItemAt[const AIndex: Integer]: TPasItem read GetPasItemAt write SetPasItemAt;

Description

Methods

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

This item is declared in ancestor TBaseItems.

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);

This item is declared in ancestor 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 ClearAndAdd(const AObject: TBaseItem);

This item is declared in ancestor TBaseItems.

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 is declared in ancestor TBaseItems.

This item has no description.

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

Public procedure Clear; reintroduce; virtual;

This item is declared in ancestor TBaseItems.

This item has no description.

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

Public procedure CopyItems(const c: TPasItems);

This item is declared in ancestor TPasItems.

Copies all Items from c to this object, not changing c at all.

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

Public procedure SortDeep(const SortSettings: TSortSettings);

This item is declared in ancestor TPasItems.

Sort all items by their (qualified) name, and call Sort(SortSettings) for each of these items. This way we sort recursively everything in this list.

This is equivalent to doing both SortShallow and SortOnlyInsideItems.

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

Public procedure SortOnlyInsideItems(const SortSettings: TSortSettings);

This item is declared in ancestor TPasItems.

Call Sort(SortSettings) for each of items on the list. It does not sort the items on this list.

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

Public procedure SortShallow(const Unqualified: Boolean = false);

This item is declared in ancestor TPasItems.

Sort all items on this list by their name, qualified or not. Unlike SortDeep, it does not call Sort for each of these items. So "items inside items" (e.g. class methods, if this list contains TPasCio objects) remain unsorted.

Parameters
Unqualified

When True, we sort first by TBaseItem.Name.

When False, we sort first by TPasItem.UnitRelativeQualifiedName, which includes unit and class names.

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

Public procedure SetFullDeclaration(PrefixName: boolean; const Suffix: string);

This item is declared in ancestor TPasItems.

Sets FullDeclaration of every item to

  1. Name of this item (only if PrefixName)

  2. + Suffix.

Very useful if you have a couple of items that share a common declaration in source file, e.g. variables or fields declared like

A, B: Integer;

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

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

This item has no description.

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

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

This item has no description.

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

Public function FindListItem(const AName: string; Index: Integer): TPasRoutine; overload;

Find an Index-th item with given name on a list. Index is 0-based. There could be multiple items sharing the same name (overloads) while method of base class returns only the one most recently added item.

Returns Nil if nothing can be found.

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

Public function FindListItem(const ANameOrSignature: string): TPasRoutine; overload;

This item has no description.

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

Public procedure Add(const AItem: TBaseItem); override;

This item has no description. Showing description inherited from TBaseItems.Add.

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 1287).

Public constructor Create(const AOwnsObject: Boolean); override;

This item has no description.

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

Public destructor Destroy; override;

This item has no description.

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

Properties

Public property PasItemAt[const AIndex: Integer]: TPasItem read GetPasItemAt write SetPasItemAt;

This item is declared in ancestor TPasItems.

This item has no description.

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


Generated by PasDoc 1.0.2.