Class TTagManager
Unit
Declaration
type TTagManager = class(TObject)
Description
This item has no description.
Source: source/component/PasDoc_TagManager.pas (line 316).
Hierarchy
- TObject
- TTagManager
Overview
Methods
| Public | constructor Create; |
| Public | destructor Destroy; override; |
| Public | procedure DoMessage(const AVerbosity: Cardinal; const MessageType: TPasDocMessageType; const AMessage: string; const AArguments: array of const); |
| Public | procedure DoMessageNonPre(const AVerbosity: Cardinal; const MessageType: TPasDocMessageType; const AMessage: string; const AArguments: array of const); |
| Public | function Execute(const Description: string; AutoLink: boolean; WantFirstSentenceEnd: boolean; out FirstSentenceEnd: Integer): string; overload; |
| Public | function Execute(const Description: string; AutoLink: boolean): string; overload; |
| Public | function CoreExecute(const Description: string; AutoLink: boolean; EnclosingTag: TTag; var EnclosingTagData: TObject; WantFirstSentenceEnd: boolean; out FirstSentenceEnd: Integer): string; overload; |
| Public | function CoreExecute(const Description: string; AutoLink: boolean; EnclosingTag: TTag; var EnclosingTagData: TObject): string; overload; |
Properties
| Public | property OnMessage: TPasDocMessageEvent read FOnMessage write FOnMessage; |
| Public | property Paragraph: string read FParagraph write FParagraph; |
| Public | property Space: string read FSpace write FSpace; |
| Public | property ShortDash: string read FShortDash write FShortDash; |
| Public | property EnDash: string read FEnDash write FEnDash; |
| Public | property EmDash: string read FEmDash write FEmDash; |
| Public | property URLLink: TStringConverter read FURLLink write FURLLink; |
| Public | property OnTryAutoLink: TTryAutoLinkEvent
read FOnTryAutoLink write FOnTryAutoLink; |
| Public | property ConvertString: TStringConverter
read FConvertString write FConvertString; |
| Public | property Abbreviations: TStringList read FAbbreviations write FAbbreviations; |
| Public | property PreExecute: boolean
read FPreExecute write FPreExecute; |
| Public | property Markdown: boolean
read FMarkdown write FMarkdown default false; |
Description
Methods
| Public | constructor Create; |
|
This item has no description. | |
| Public | destructor Destroy; override; |
|
This item has no description. | |
| Public | procedure DoMessage(const AVerbosity: Cardinal; const MessageType: TPasDocMessageType; const AMessage: string; const AArguments: array of const); |
|
Call OnMessage (if assigned) with given params. | |
| Public | procedure DoMessageNonPre(const AVerbosity: Cardinal; const MessageType: TPasDocMessageType; const AMessage: string; const AArguments: array of const); |
|
Call DoMessage only if PreExecute is | |
| Public | function Execute(const Description: string; AutoLink: boolean; WantFirstSentenceEnd: boolean; out FirstSentenceEnd: Integer): string; overload; |
|
This method is the very essence of this class and this unit. It expands Description, which means that it processes Description (text supplied by user in some comment in parsed unit) into something ready to be included in output documentation. This means that this handles parsing @-tags, inserting paragraph markers, recognizing URLs in Description and correctly translating it, and translating rest of the "normal" text via ConvertString. If WantFirstSentenceEnd then we will look for '.' char followed by any whitespace in Description. Moreover, this '.' must be outside of any @-tags parameter. Under FirstSentenceEnd we will return the number of beginning characters in the output string that will include correspong '.' character (note that this definition takes into account that ConvertString may translate '.' into something longer). If no such character exists in Description, FirstSentenceEnd will be set to Length(Result), so the whole Description will be treated as it's first sentence. If WantFirstSentenceEnd, FirstSentenceEnd will not be set. | |
| Public | function Execute(const Description: string; AutoLink: boolean): string; overload; |
|
This is equivalent to Execute(Description, AutoLink, false, Dummy) | |
| Public | 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. | |
| Public | function CoreExecute(const Description: string; AutoLink: boolean; EnclosingTag: TTag; var EnclosingTagData: TObject): string; overload; |
|
This item has no description. | |
Properties
| Public | 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. | |
| Public | property Paragraph: string read FParagraph write FParagraph; |
|
This will be inserted on paragraph marker (two consecutive newlines, see wiki page WritingDocumentation) in the text. This should specify how paragraphs are marked in particular output format, e.g. html generator may set this to '<p>'. Default value is ' ' (one space). | |
| Public | property Space: string read FSpace write FSpace; |
|
This will be inserted on each whitespace sequence (but not on paragraph break). This is consistent with 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). | |
| Public | property ShortDash: string read FShortDash write FShortDash; |
|
This will be inserted on Default value is '-'. You will never get any '-' character to be converted by ConvertString. Convertion of '-' is controlled solely by XxxDash properties of tag manager.
See also | |
| Public | property EnDash: string read FEnDash write FEnDash; |
|
This will be inserted on | |
| Public | property EmDash: string read FEmDash write FEmDash; |
|
This will be inserted on | |
| Public | 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. | |
| Public | 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. | |
| Public | property ConvertString: TStringConverter
read FConvertString write FConvertString; |
|
This item has no description. | |
| Public | property Abbreviations: TStringList read FAbbreviations write FAbbreviations; |
|
This item has no description. | |
| Public | property PreExecute: boolean
read FPreExecute write FPreExecute; |
|
When
| |
| Public | property Markdown: boolean
read FMarkdown write FMarkdown default false; |
|
When | |
Generated by PasDoc 0.17.0.snapshot.