Class TPasCio
Unit
Declaration
type TPasCio = class(TPasType)
Description
Extends TPasItem to store all items in a class / an object, e.g. fields.
TODO: Rename to TPasStructure, most general term.
Source: source/component/PasDoc_Items.pas (line 793).
Hierarchy
- TObject
- TSerializable
- TBaseItem
- TPasItem
- TPasType
- TPasCio
Overview
Fields
| Protected | FClassDirective: TClassDirective; |
| Protected | FFields: TPasItems; |
| Protected | FMethods: TPasRoutines; |
| Protected | FProperties: TPasProperties; |
| Protected | FAncestors: TStringPairVector; |
| Protected | FOutputFileName: string; |
| Protected | FMyType: TCIOType; |
| Protected | FHelperTypeIdentifier: string; |
| Protected | FCios: TPasNestedCios; |
| Protected | FTypes: TPasTypes; |
| Protected | FNameWithGeneric: string; |
Methods
| Protected | procedure Serialize(const ADestination: TStream); override; |
| Protected | procedure Deserialize(const ASource: TStream); override; |
| Protected | procedure StoreMemberTag(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 | function FindItem(const ItemName: string): TBaseItem; override; |
| Public | function FindItemMaybeInAncestors(const ItemName: string): TBaseItem; override; |
| Public | function FindItemInAncestors(const ItemName: string): TPasItem; |
| Public | procedure Sort(const SortSettings: TSortSettings); override; |
| Public | procedure RegisterTags(TagManager: TTagManager); override; |
| Public | function FirstAncestor: TPasItem; |
| Public | function InheritedItem: TPasItem; override; |
| Public | function GetInheritedItemDescriptions: TStringPairVector; override; |
| Public | function FirstAncestorName: string; |
| Public | function ShowVisibility: boolean; |
Properties
| Public | property Ancestors: TStringPairVector read FAncestors; |
| Public | property Cios: TPasNestedCios read FCios; |
| Public | property ClassDirective: TClassDirective read FClassDirective
write FClassDirective; |
| Public | property Fields: TPasItems read FFields; |
| Public | property HelperTypeIdentifier: string read FHelperTypeIdentifier
write FHelperTypeIdentifier; |
| Public | property Methods: TPasRoutines read FMethods; |
| Public | property Properties: TPasProperties read FProperties; |
| Public | property MyType: TCIOType read FMyType write FMyType; |
| Public | property OutputFileName: string read FOutputFileName write FOutputFileName; |
| Public | property Types: TPasTypes read FTypes; |
| Public | property NameWithGeneric: string read FNameWithGeneric write FNameWithGeneric; |
Description
Fields
| Protected | FClassDirective: TClassDirective; |
|
This item has no description. | |
| Protected | FFields: TPasItems; |
|
This item has no description. | |
| Protected | FMethods: TPasRoutines; |
|
This item has no description. | |
| Protected | FProperties: TPasProperties; |
|
This item has no description. | |
| Protected | FAncestors: TStringPairVector; |
|
This item has no description. | |
| Protected | FOutputFileName: string; |
|
This item has no description. | |
| Protected | FMyType: TCIOType; |
|
This item has no description. | |
| Protected | FHelperTypeIdentifier: string; |
|
This item has no description. | |
| Protected | FCios: TPasNestedCios; |
|
This item has no description. | |
| Protected | FTypes: TPasTypes; |
|
This item has no description. | |
| Protected | FNameWithGeneric: string; |
|
This item has no description. | |
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,
| |
| Protected | procedure Deserialize(const ASource: TStream); override; |
|
This item has no description. | |
| Protected | procedure StoreMemberTag(ThisTag: TTag; var ThisTagData: TObject; EnclosingTag: TTag; var EnclosingTagData: TObject; const TagParameter: string; var ReplaceStr: string); |
|
This item has no description. | |
| Public | constructor Create; override; |
|
This item has no description. | |
| Public | destructor Destroy; override; |
|
This item has no description. | |
| Public | function FindItem(const ItemName: string): TBaseItem; override; |
|
If this class (or interface or object) contains a field, method or property with the name of ItemName, the corresponding item pointer is returned. | |
| Public | function FindItemMaybeInAncestors(const ItemName: string): TBaseItem; override; |
|
This item has no description. Showing description inherited from TBaseItem.FindItemMaybeInAncestors. This is just like FindItem, but in case of classes or such it should also search within ancestors. In this class, the default implementation just calls FindItem. | |
| Public | function FindItemInAncestors(const ItemName: string): TPasItem; |
|
This searches for item (field, method or property) defined in ancestor of this cio. I.e. searches within the FirstAncestor, then within FirstAncestor.FirstAncestor, and so on. Returns nil if not found. | |
| Public | procedure Sort(const SortSettings: TSortSettings); override; |
|
This item has no description. Showing description inherited from TPasItem.Sort. This recursively sorts all items inside this item, and all items inside these items, etc. E.g. in case of TPasUnit, this method sorts all variables, consts, CIOs etc. inside (honouring SortSettings), and also recursively calls Sort(SortSettings) for every CIO. Note that this does not guarantee that absolutely everything inside will be really sorted. Some items may be deliberately left unsorted, e.g. Members of TPasEnum are never sorted (their declared order always matters, so we shouldn't sort them when displaying their documentation — reader of such documentation would be seriously misleaded). Sorting of other things depends on SortSettings — e.g. without ssMethods, CIOs methods will not be sorted. So actually this method makes sure that all things that should be sorted are really sorted. | |
| Public | procedure RegisterTags(TagManager: TTagManager); override; |
|
This item has no description. Showing description inherited from TBaseItem.RegisterTags. It registers TTags that init Authors, Created, LastMod and remove relevant tags from description. You can override it to add more handlers. | |
| Public | function FirstAncestor: TPasItem; |
|
This returns Ancestors[0].Data, i.e. instance of the first ancestor of this Cio (or nil if it couldn't be found), or nil if Ancestors.Count = 0. | |
| Public | function InheritedItem: TPasItem; override; |
|
Get the closest item that this item inherits from. Returns the value of FirstAncestor. | |
| Public | function GetInheritedItemDescriptions: TStringPairVector; override; |
|
This item has no description. Showing description inherited from TPasItem.GetInheritedItemDescriptions. Generate a list of descriptions defined on this item in base classes. This stops at the first class ancestor to have a description defined for an ancestor of this item. Along the way it will also collect descriptions of this item from any implemented interfaces. If there is no description in any ancestor, it will return an empty vector. | |
| Public | function FirstAncestorName: string; |
|
This returns the name of first ancestor of this Cio. If Ancestor.Count > 0 then it simply returns Ancestors[0], i.e. the name of the first ancestor as was specified at class declaration, else it returns ''. So this method is roughly something like
If this function returns '', then you can be sure that FirstAncestor returns nil. The other way around is not necessarily true — FirstAncestor may be nil, but still this function may return something <> ''. | |
| Public | function ShowVisibility: boolean; |
|
Is Visibility of items (Fields, Methods, Properties) important ? | |
Properties
| Public | property Ancestors: TStringPairVector read FAncestors; |
|
Name of the ancestor (class, object, interface). Each item is a TStringPair, with
Note that each ancestor is a TPasItem, not necessarily TPasCio. Consider e.g. the case TMyStringList = Classes.TStringList; TMyExtendedStringList = class(TMyStringList) ... end; At least for now, such declaration will result in TPasType (not TPasCio!) with Name = 'TMyStringList', which means that ancestor of TMyExtendedStringList will be a TPasType instance. Note that the PasDoc_Parser already takes care of correctly setting Ancestors when user didn't specify any ancestor name at cio declaration. E.g. if this cio is a class, and user didn't specify ancestor name at class declaration, and this class name is not 'TObject' (in case pasdoc parses the RTL), the Ancestors[0] will be set to 'TObject'. | |
| Public | property Cios: TPasNestedCios read FCios; |
|
Nested classes (and records, interfaces...). | |
| Public | property ClassDirective: TClassDirective read FClassDirective
write FClassDirective; |
|
| |
| Public | property Fields: TPasItems read FFields; |
|
list of all fields | |
| Public | property HelperTypeIdentifier: string read FHelperTypeIdentifier
write FHelperTypeIdentifier; |
|
Class or record helper type identifier | |
| Public | property Methods: TPasRoutines read FMethods; |
|
list of all methods | |
| Public | property Properties: TPasProperties read FProperties; |
|
list of properties | |
| Public | property MyType: TCIOType read FMyType write FMyType; |
|
determines if this is a class, an interface or an object | |
| Public | property OutputFileName: string read FOutputFileName write FOutputFileName; |
|
name of documentation output file (if each class / object gets its own file, that's the case for HTML, but not for TeX) | |
| Public | property Types: TPasTypes read FTypes; |
|
Simple nested types (that don't fall into Cios). | |
| Public | property NameWithGeneric: string read FNameWithGeneric write FNameWithGeneric; |
|
Name, with optional "generic" directive before (for FPC generics) and generic type identifiers list "<foo,bar>" after (for FPC and Delphi generics). | |
Generated by PasDoc 0.17.0.snapshot.