Class TBaseItem
Unit
Declaration
type TBaseItem = class(TSerializable)
Description
This is a basic item class, that is linkable, and has some RawDescription.
Hierarchy
- TObject
- TSerializable
- TBaseItem
Overview
Methods
procedure Serialize(const ADestination: TStream); override; |
|
procedure Deserialize(const ASource: TStream); override; |
|
constructor Create; override; |
|
destructor Destroy; override; |
|
procedure RegisterTags(TagManager: TTagManager); virtual; |
|
function FindItem(const ItemName: string): TBaseItem; virtual; |
|
function FindItemMaybeInAncestors(const ItemName: string): TBaseItem; virtual; |
|
function FindName(const NameParts: TNameParts): TBaseItem; virtual; |
|
function RawDescriptionInfo: PRawDescriptionInfo; |
|
function QualifiedName: String; virtual; |
|
function BasePath: string; virtual; |
Properties
property DetailedDescription: string
read FDetailedDescription write FDetailedDescription; |
|
property RawDescription: string
read GetRawDescription write WriteRawDescription; |
|
property FullLink: string read FFullLink write FFullLink; |
|
property LastMod: string read FLastMod write FLastMod; |
|
property Name: string read FName write FName; |
|
property Authors: TStringVector read FAuthors write SetAuthors; |
|
property Created: string read FCreated; |
|
property AutoLinkHereAllowed: boolean
read FAutoLinkHereAllowed write FAutoLinkHereAllowed default true; |
Description
Methods
procedure Deserialize(const ASource: TStream); override; |
|
constructor Create; override; |
|
destructor Destroy; override; |
|
procedure RegisterTags(TagManager: TTagManager); virtual; |
|
It registers TTags that init Authors, Created, LastMod and remove relevant tags from description. You can override it to add more handlers. |
function FindItem(const ItemName: string): TBaseItem; virtual; |
|
Search for an item called ItemName inside this Pascal item. For units, it searches for items declared inside this unit (like a procedure, or a class in this unit). For classes it searches for items declared within this class (like a method or a property). For an enumerated type, it searches for members of this enumerated type. All normal rules of ObjectPascal scope apply, which means that e.g. if this item is a unit, Returns nil if not found. Note that it never compares ItemName with Self.Name. You may want to check this yourself if you want. Note that for TPasItem descendants, it always returns also some TPasItem descendant (so if you use this method with some TPasItem instance, you can safely cast result of this method to TPasItem). Implementation in this class always returns nil. Override as necessary. |
function FindItemMaybeInAncestors(const ItemName: string): TBaseItem; virtual; |
|
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. |
function FindName(const NameParts: TNameParts): TBaseItem; virtual; |
|
Do all you can to find link specified by NameParts. While searching this tries to mimic ObjectPascal identifier scope as much as it can. It seaches within this item, but also within class enclosing this item, within ancestors of this class, within unit enclosing this item, then within units used by unit of this item. |
function RawDescriptionInfo: PRawDescriptionInfo; |
|
Full info about RawDescription of this item, including it's filename and position. This is intended to be initialized by parser. This returns PRawDescriptionInfo instead of just TRawDescriptionInfo to allow natural setting of properties of this record (otherwise Item.RawDescriptionInfo.StreamName := 'foo';
would not work as expected) . |
Properties
property DetailedDescription: string
read FDetailedDescription write FDetailedDescription; |
|
Detailed description of this item. In case of TPasItem, this is something more elaborate than TPasItem.AbstractDescription. This is already in the form suitable for final output, ready to be put inside final documentation. |
property RawDescription: string
read GetRawDescription write WriteRawDescription; |
|
This stores unexpanded version (as specified in user's comment in source code of parsed units) of description of this item. Actually, this is just a shortcut to |
property FullLink: string read FFullLink write FFullLink; |
|
a full link that should be enough to link this item from anywhere else |
property Name: string read FName write FName; |
|
name of the item |
property Authors: TStringVector read FAuthors write SetAuthors; |
|
list of strings, each representing one author of this item |
Generated by PasDoc 0.16.0.