Class TTagManager
Unit
Declaration
type TTagManager = class(TObject)
Description
Hierarchy
- TObject
- TTagManager
Overview
Methods
constructor Create; |
|
destructor Destroy; override; |
|
procedure DoMessage(const AVerbosity: Cardinal; const MessageType: TPasDocMessageType; const AMessage: string; const AArguments: array of const); |
|
procedure DoMessageNonPre(const AVerbosity: Cardinal; const MessageType: TPasDocMessageType; const AMessage: string; const AArguments: array of const); |
|
function Execute(const Description: string; AutoLink: boolean; WantFirstSentenceEnd: boolean; out FirstSentenceEnd: Integer): string; overload; |
|
function Execute(const Description: string; AutoLink: boolean): string; overload; |
|
function CoreExecute(const Description: string; AutoLink: boolean; EnclosingTag: TTag; var EnclosingTagData: TObject; WantFirstSentenceEnd: boolean; out FirstSentenceEnd: Integer): string; overload; |
|
function CoreExecute(const Description: string; AutoLink: boolean; EnclosingTag: TTag; var EnclosingTagData: TObject): string; overload; |
Properties
property OnMessage: TPasDocMessageEvent read FOnMessage write FOnMessage; |
|
property Paragraph: string read FParagraph write FParagraph; |
|
property Space: string read FSpace write FSpace; |
|
property ShortDash: string read FShortDash write FShortDash; |
|
property EnDash: string read FEnDash write FEnDash; |
|
property EmDash: string read FEmDash write FEmDash; |
|
property URLLink: TStringConverter read FURLLink write FURLLink; |
|
property OnTryAutoLink: TTryAutoLinkEvent
read FOnTryAutoLink write FOnTryAutoLink; |
|
property ConvertString: TStringConverter
read FConvertString write FConvertString; |
|
property Abbreviations: TStringList read FAbbreviations write FAbbreviations; |
|
property PreExecute: boolean
read FPreExecute write FPreExecute; |
|
property Markdown: boolean
read FMarkdown write FMarkdown default false; |
Description
Methods
constructor Create; |
|
destructor Destroy; override; |
|
procedure DoMessage(const AVerbosity: Cardinal; const MessageType: TPasDocMessageType; const AMessage: string; const AArguments: array of const); |
|
Call OnMessage (if assigned) with given params. |
procedure DoMessageNonPre(const AVerbosity: Cardinal; const MessageType: TPasDocMessageType; const AMessage: string; const AArguments: array of const); |
|
Call DoMessage only if PreExecute is |
function Execute(const Description: string; AutoLink: boolean): string; overload; |
|
This is equivalent to Execute(Description, AutoLink, false, Dummy) |
function CoreExecute(const Description: string; AutoLink: boolean; EnclosingTag: TTag; var EnclosingTagData: TObject; WantFirstSentenceEnd: boolean; out FirstSentenceEnd: Integer): string; overload; |
|
This is the underlying version of Execute. Use with caution! If EnclosingTag = nil then this is understood to be toplevel of description, which means that all tags are allowed inside. If EnclosingTag <> nil then this is not toplevel. EnclosingTagData returns collected data for given EnclosingTag. You should init it to EnclosingTag.CreateOccurenceData. It will be passed as EnclosingTagData to each of @-tags found inside Description. |
function CoreExecute(const Description: string; AutoLink: boolean; EnclosingTag: TTag; var EnclosingTagData: TObject): string; overload; |
|
Properties
property OnMessage: TPasDocMessageEvent read FOnMessage write FOnMessage; |
|
This will be used to print messages from within Execute. Note that in this unit we essentialy "don't know" that parsed Description string is probably attached to some TPasItem. It's good that we don't know it (because it makes this class more flexible). But it also means that OnMessage that you assign here may want to add to passed AMessage something like + ' (Expanded_TPasItem_Name)', see e.g. TDocGenerator.DoMessageFromExpandDescription. Maybe in the future we will do some descendant of this class, like TTagManagerForPasItem. |
property Space: string read FSpace write FSpace; |
|
This will be inserted on each whitespace sequence (but not on paragraph break). This is consistent with [https://github.com/pasdoc/pasdoc/wiki/WritingDocumentation] that clearly says that "amount of whitespace does not matter". Although in some pasdoc output formats amount of whitespace also does not matter (e.g. HTML and LaTeX) but in other (e.g. plain text) it matters, so such space compression is needed. In other output formats (no examples yet) it may need to be expressed by something else than simple space, that's why this property is exposed. Default value is ' ' (one space). |
property EnDash: string read FEnDash write FEnDash; |
|
This will be inserted on |
property EmDash: string read FEmDash write FEmDash; |
|
This will be inserted on |
property URLLink: TStringConverter read FURLLink write FURLLink; |
|
This will be called from Execute when URL will be found in Description. Note that passed here URL will not be processed by ConvertString. This tells what to put in result on URL. If this is not assigned, then ConvertString(URL) will be appended to Result in Execute. |
property OnTryAutoLink: TTryAutoLinkEvent
read FOnTryAutoLink write FOnTryAutoLink; |
|
This should check does QualifiedIdentifier looks like a name of some existing identifier. If yes, sets AutoLinked to true and sets QualifiedIdentifierReplacement to a link to QualifiedIdentifier (QualifiedIdentifierReplacement should be ready to be put in final documentation, i.e. already in the final output format). By default AutoLinked is false. |
property ConvertString: TStringConverter
read FConvertString write FConvertString; |
|
property Abbreviations: TStringList read FAbbreviations write FAbbreviations; |
|
property PreExecute: boolean
read FPreExecute write FPreExecute; |
|
When
|
property Markdown: boolean
read FMarkdown write FMarkdown default false; |
|
When |
Generated by PasDoc 0.16.0.