Class TPasRoutine

Unit

Declaration

type TPasRoutine = class(TPasItem)

Description

This represents:

  1. global function/procedure,

  2. method (function/procedure of a structure (TPasCio)),

  3. type (pointer to one of the above) (in this case Name is the type name).

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

Hierarchy

Overview

Fields

Protected FReturns: string;
Protected FWhat: TRoutineType;
Protected FDirectives: TStandardDirectives;
Protected FParamTypes: TStringVector;
Protected FIsType: Boolean;

Methods

Protected procedure Serialize(const ADestination: TStream); override;
Protected procedure Deserialize(const ASource: TStream); override;
Protected procedure StoreReturnsTag(ThisTag: TTag; var ThisTagData: TObject; EnclosingTag: TTag; var EnclosingTagData: TObject; const TagParameter: string; var ReplaceStr: string);
Public constructor Create; override;
Public destructor Destroy; override;
Public procedure RegisterTags(TagManager: TTagManager); override;
Public function HasOptionalInfo: boolean; override;
Public function Signature: string; override;
Public function InheritedItem: TPasItem; override;
Public function IsOverride: Boolean; override;

Properties

Public property What: TRoutineType read FWhat write FWhat;
Public property IsType: Boolean read FIsType write FIsType default false;
Public property Returns: string read FReturns;
Public property Directives: TStandardDirectives read FDirectives write FDirectives;
Public property ParamTypes: TStringVector read FParamTypes write FParamTypes;

Description

Fields

Protected FReturns: string;

This item has no description.

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

Protected FWhat: TRoutineType;

This item has no description.

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

Protected FDirectives: TStandardDirectives;

This item has no description.

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

Protected FParamTypes: TStringVector;

This item has no description.

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

Protected FIsType: Boolean;

This item has no description.

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

Methods

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

This item has no description. Showing description inherited from TBaseItem.Serialize.

Serialization of TPasItem need to store in stream only data that is generated by parser. That's because current approach treats "loading from cache" as equivalent to parsing a unit and stores to cache right after parsing a unit. So what is generated by parser must be written to cache.

That said,

  1. It will not break anything if you will accidentally store in cache something that is not generated by parser. That's because saving to cache will be done anyway right after doing parsing, so properties not initialized by parser will have their initial values anyway. You're just wasting memory for cache, and some cache saving/loading time.

  2. For now, in implementation of serialize/deserialize we try to add even things not generated by parser in a commented out code. This way if approach to cache will change some day, we will be able to use this code.

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

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

This item has no description.

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

Protected procedure StoreReturnsTag(ThisTag: TTag; var ThisTagData: TObject; EnclosingTag: TTag; var EnclosingTagData: TObject; const TagParameter: string; var ReplaceStr: string);

This item has no description.

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

Public constructor Create; override;

This item has no description.

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

Public destructor Destroy; override;

This item has no description.

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

Public procedure RegisterTags(TagManager: TTagManager); override;

In addition to inherited, this also registers TTag that inits Returns.

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

Public function HasOptionalInfo: boolean; override;

This item has no description. Showing description inherited from TPasItem.HasOptionalInfo.

Is optional information (that may be empty for after parsing unit and expanding tags) specified. Currently this checks Params and Raises and TPasRoutine.Returns.

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

Public function Signature: string; override;

This item has no description.

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

Public function InheritedItem: TPasItem; override;

Get the closest item that this item inherits from. Returns Nil if the routine does not override.

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

Public function IsOverride: Boolean; override;

This item has no description. Showing description inherited from TPasItem.IsOverride.

Whether this item overrides an item in an ancestor.

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

Properties

Public property What: TRoutineType read FWhat write FWhat;

Routine type, see TRoutineType.

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

Public property IsType: Boolean read FIsType write FIsType default false;

Is this a type (pointer to routine).

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

Public property Returns: string read FReturns;

What does the method return.

This is already in the form processed by TTagManager.Execute, i.e. with links resolved, html characters escaped etc. So don't convert them (e.g. before writing to the final docs) once again (by some ExpandDescription or ConvertString or anything like that).

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

Public property Directives: TStandardDirectives read FDirectives write FDirectives;

Set of method directive flags

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

Public property ParamTypes: TStringVector read FParamTypes write FParamTypes;

This item has no description.

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


Generated by PasDoc 0.17.0.snapshot.