Class TTopLevelTag
Unit
Declaration
type TTopLevelTag = class(TTag)
Description
This item has no description.
Source: source/component/PasDoc_TagManager.pas (line 278).
Hierarchy
- TObject
- TTag
- TTopLevelTag
Overview
Methods
| Public | constructor Create(ATagManager: TTagManager; const AName: string; AOnPreExecute: TTagExecuteEvent; AOnExecute: TTagExecuteEvent; const ATagOptions: TTagOptions); |
| Public | procedure PreExecute(var ThisTagData: TObject; EnclosingTag: TTag; var EnclosingTagData: TObject; const TagParameter: string; var ReplaceStr: string); virtual; |
| Public | procedure Execute(var ThisTagData: TObject; EnclosingTag: TTag; var EnclosingTagData: TObject; const TagParameter: string; var ReplaceStr: string); virtual; |
| Public | function CreateOccurenceData: TObject; virtual; |
| Public | procedure DestroyOccurenceData(Value: TObject); virtual; |
| Public | function AllowedInside(EnclosingTag: TTag): boolean; override; |
Properties
| Public | property TagOptions: TTagOptions read FTagOptions write FTagOptions; |
| Public | property TagManager: TTagManager read FTagManager; |
| Public | property Name: string read FName write FName; |
| Public | property OnPreExecute: TTagExecuteEvent
read FOnPreExecute write FOnPreExecute; |
| Public | property OnExecute: TTagExecuteEvent
read FOnExecute write FOnExecute; |
| Public | property OnAllowedInside: TTagAllowedInsideEvent
read FOnAllowedInside write FOnAllowedInside; |
Description
Methods
| Public | constructor Create(ATagManager: TTagManager; const AName: string; AOnPreExecute: TTagExecuteEvent; AOnExecute: TTagExecuteEvent; const ATagOptions: TTagOptions); |
|
This item is declared in ancestor TTag. Note that AName will be converted to lowercase before assigning to Name. | |
| Public | procedure PreExecute(var ThisTagData: TObject; EnclosingTag: TTag; var EnclosingTagData: TObject; const TagParameter: string; var ReplaceStr: string); virtual; |
|
This item is declared in ancestor TTag.
This is completely analogous to Execute but used when TTagManager.PreExecute is | |
| Public | procedure Execute(var ThisTagData: TObject; EnclosingTag: TTag; var EnclosingTagData: TObject; const TagParameter: string; var ReplaceStr: string); virtual; |
|
This item is declared in ancestor TTag. This will be used to do main work when this @-tag occured in description. EnclosingTag parameter specifies enclosing tag. This is useful for tags that must behave differently in different contexts, e.g. in plain-text output @item tag will behave differently inside @orderedList and @unorderedList. EnclosingTag is nil when the tag occured at top level of the description. ThisTagData and EnclosingTagData form a mechanism to pass arbitraty data between child tags enclosed within one parent tag. Example uses:
How does this XxxTagData mechanism work: When we start parsing parameter of some tag with toRecursiveTags, we create a new pointer inited to CreateOccurenceData. When @-tags occur inside this parameter, we pass them this pointer as EnclosingTagData (this way all @-tags with the same parent can use this pointer to communicate with each other). At the end, when parameter was parsed, we call given tag's Execute method passing the resulting pointer as ThisTagData (this way @-tags with the same parent can use this pointer to pass some data to their parent). In this class this method simply calls OnExecute (if assigned). | |
| Public | function CreateOccurenceData: TObject; virtual; |
|
This item is declared in ancestor TTag.
In this class this simply returns | |
| Public | procedure DestroyOccurenceData(Value: TObject); virtual; |
|
This item is declared in ancestor TTag.
In this class this simply does | |
| Public | function AllowedInside(EnclosingTag: TTag): boolean; override; |
|
This returns just Which means that this tag is allowed only at top level of description, never inside parameter of some tag. | |
Properties
| Public | property TagOptions: TTagOptions read FTagOptions write FTagOptions; |
|
This item is declared in ancestor TTag. This item has no description. | |
| Public | property TagManager: TTagManager read FTagManager; |
|
This item is declared in ancestor TTag. TagManager that will recognize and handle this tag. Note that the tag instance is owned by this tag manager (i.e. it will be freed inside this tag manager). It can be nil if no tag manager currently owns this tag. Note that it's very useful in Execute or OnExecute implementations. E.g. you can use it to report a message by You could also use this to manually force recursive behavior of a given tag. I.e let's suppose that you have a tag with TagOptions = [toParameterRequired], so the TagParameter parameter passed to handler was not recursively expanded. Then you can do inside your handler NewTagParameter := TagManager.Execute(TagParameter, ...) and this way you have explicitly recursively expanded the tag. Scenario above is actually used in implementation of @noAutoLink tag. There I call TagManager.Execute with parameter | |
| Public | property Name: string read FName write FName; |
|
This item is declared in ancestor TTag. Name of the tag, that must be specified by user after the "@" sign. Value of this property must always be lowercase. | |
| Public | property OnPreExecute: TTagExecuteEvent
read FOnPreExecute write FOnPreExecute; |
|
This item is declared in ancestor TTag. This item has no description. | |
| Public | property OnExecute: TTagExecuteEvent
read FOnExecute write FOnExecute; |
|
This item is declared in ancestor TTag. This item has no description. | |
| Public | property OnAllowedInside: TTagAllowedInsideEvent
read FOnAllowedInside write FOnAllowedInside; |
|
This item is declared in ancestor TTag. This item has no description. | |
Generated by PasDoc 1.0.2.