Class TPasProperty

Unit

Declaration

type TPasProperty = class(TPasItem)

Description

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

This is a TBaseItem descendant that is always declared inside some Pascal source file.

Parser creates only items of this class (e.g. never some basic TBaseItem instance). This class introduces properties and methods pointing to parent unit (MyUnit) and parent class/interface/object/record (MyObject). Also many other things not needed at TBaseItem level are introduced here: things related to handling @abstract tag, @seealso tag, used to sorting items inside (Sort) and some more.

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

Hierarchy

Overview

Fields

Protected FDefaultInClass: Boolean;
Protected FNoDefault: Boolean;
Protected FIndexDecl: string;
Protected FStored: string;
Protected FDefaultValue: string;
Protected FWriter: string;
Protected FPropType: string;
Protected FReader: string;

Methods

Protected procedure Serialize(const ADestination: TStream); override;
Protected procedure Deserialize(const ASource: TStream); override;
Public function InheritedItem: TPasItem; override;
Public function IsOverride: Boolean; override;

Properties

Public property IndexDecl: string read FIndexDecl write FIndexDecl;
Public property Proptype: string read FPropType write FPropType;
Public property Reader: string read FReader write FReader;
Public property Writer: string read FWriter write FWriter;
Public property DefaultInClass: Boolean read FDefaultInClass write FDefaultInClass;
Public property DefaultValue: string read FDefaultValue write FDefaultValue;
Public property NoDefault: Boolean read FNoDefault write FNoDefault;
Public property Stored: string read FStored write FStored;

Description

Fields

Protected FDefaultInClass: Boolean;

This item has no description.

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

Protected FNoDefault: Boolean;

This item has no description.

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

Protected FIndexDecl: string;

This item has no description.

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

Protected FStored: string;

This item has no description.

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

Protected FDefaultValue: string;

This item has no description.

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

Protected FWriter: string;

This item has no description.

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

Protected FPropType: string;

This item has no description.

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

Protected FReader: string;

This item has no description.

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

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

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

This item has no description.

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

Public function InheritedItem: TPasItem; override;

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

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

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

Properties

Public property IndexDecl: string read FIndexDecl write FIndexDecl;

contains the optional index declaration, including brackets

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

Public property Proptype: string read FPropType write FPropType;

contains the type of the property

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

Public property Reader: string read FReader write FReader;

read specifier

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

Public property Writer: string read FWriter write FWriter;

write specifier

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

Public property DefaultInClass: Boolean read FDefaultInClass write FDefaultInClass;

Is it the default property in class. For example "property Items[I: Integer]: String read GetItems; default;".

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

Public property DefaultValue: string read FDefaultValue write FDefaultValue;

Default value. For example it will be 123 for declaration like this "property Xxx: Integer default 123;".

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

Public property NoDefault: Boolean read FNoDefault write FNoDefault;

true if Nodefault property

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

Public property Stored: string read FStored write FStored;

keeps Stored specifier

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


Generated by PasDoc 0.17.0.snapshot.