Class TPHPDocGenerator

Unit

Declaration

type TPHPDocGenerator = class(TDocGenerator)

Description

PHP output generator.

Source: source/component/PasDoc_GenPHP.pas (line 35).

Hierarchy

Show Additional Members:

Overview

Constants

Public DefaultAutoAbstract = true;

Fields

Protected FLanguage: TPasDocLanguages;
Protected FClassHierarchy: TStringCardinalTree;
Protected FUnits: TPasUnits;

Methods

Protected procedure DoError(const AMessage: string; const AArguments: array of const; const AExitCode: Word);
Protected procedure DoMessage(const AVerbosity: Cardinal; const MessageType: TPasDocMessageType; const AMessage: string; const AArguments: array of const);
Protected procedure CreateClassHierarchy;
Protected function MakeItemLink(const Item: TBaseItem; const LinkCaption: string; const LinkContext: TLinkContext): string; virtual;
Protected procedure WriteCodeWithLinksCommon(const Item: TPasItem; const Code: string; WriteItemLink: boolean; const NameLinkBegin, NameLinkEnd: string);
Protected function HasSourcePosition(const AItem: TPasItem; out ItemName, ItemFilenameInRoot, ItemUrl: string): boolean;
Protected procedure CloseStream;
Protected function CreateLink(const Item: TBaseItem): string; virtual;
Protected function CreateStream(const AName: string): Boolean;
Protected function ExtractEmailAddress(s: string; out S1, S2, EmailAddress: string): Boolean;
Protected function FixEmailaddressWithoutMailTo(const PossibleEmailAddress: String): String;
Protected function ExtractWebAddress(s: string; out S1, S2, WebAddress: string): Boolean;
Protected function FindGlobal(const NameParts: TNameParts): TBaseItem;
Protected function FindGlobalPasItem(const NameParts: TNameParts): TPasItem; overload;
Protected function FindGlobalPasItem(const ItemName: String): TPasItem; overload;
Protected function GetClassDirectiveName(const Directive: TClassDirective): string;
Protected function GetCIOTypeName(const MyType: TCIOType): string;
Protected procedure LoadDescriptionFile(n: string);
Protected function SearchItem(s: string; const Item: TBaseItem; WarningIfNotSplittable: boolean): TBaseItem;
Protected function SearchLink(s: string; const Item: TBaseItem; const LinkDisplay: string; const WarningIfLinkNotFound: TLinkNotFoundAction; out FoundItem: TBaseItem): string; overload;
Protected function SearchLink(s: string; const Item: TBaseItem; const LinkDisplay: string; const WarningIfLinkNotFound: TLinkNotFoundAction): string; overload;
Protected procedure StoreDescription(ItemName: string; var t: string);
Protected procedure WriteConverted(const s: string; Newline: boolean); overload;
Protected procedure WriteConverted(const s: string); overload;
Protected procedure WriteConvertedLine(const s: string);
Protected procedure WriteDirect(const t: string; Newline: boolean); overload;
Protected procedure WriteDirect(const t: string); overload;
Protected procedure WriteDirectLine(const t: string);
Protected procedure WriteUnits(const HL: integer);
Protected procedure WriteStartOfCode; virtual;
Protected procedure WriteEndOfCode; virtual;
Protected procedure WriteGVUses;
Protected procedure WriteGVClasses;
Protected procedure StartSpellChecking(const AMode: string);
Protected procedure CheckString(const AString: string; const AErrors: TSpellingErrorList);
Protected procedure EndSpellChecking;
Protected function FormatPascalCode(const Line: string): string; virtual;
Protected function FormatNormalCode(AString: string): string; virtual;
Protected function FormatComment(AString: string): string; virtual;
Protected function FormatHex(AString: string): string; virtual;
Protected function FormatNumeric(AString: string): string; virtual;
Protected function FormatFloat(AString: string): string; virtual;
Protected function FormatString(AString: string): string; virtual;
Protected function FormatKeyWord(AString: string): string; virtual;
Protected function FormatCompilerComment(AString: string): string; virtual;
Protected function Paragraph: string; virtual;
Protected function ShortDash: string; virtual;
Protected function EnDash: string; virtual;
Protected function EmDash: string; virtual;
Protected function HtmlString(const S: string): string; virtual;
Protected function LatexString(const S: string): string; virtual;
Protected function LineBreak: string; virtual;
Protected function URLLink(const URL: string): string; overload; virtual;
Protected function URLLink(const URL, LinkDisplay: string): string; overload; virtual;
Protected procedure WriteExternal(const ExternalItem: TExternalItem; const Id: TTranslationID);
Protected procedure WriteConclusion;
Protected procedure WriteIntroduction;
Protected procedure WriteAdditionalFiles;
Protected function FormatBold(const Text: string): string; virtual;
Protected function FormatItalic(const Text: string): string; virtual;
Protected function FormatWarning(const Text: string): string; virtual;
Protected function FormatNote(const Text: string): string; virtual;
Protected function FormatPreformatted(const Text: string): string; virtual;
Protected function FormatImage(FileNames: TStringList): string; virtual;
Protected function FormatTableOfContents(Sections: TStringPairVector): string; virtual;
Public procedure BuildLinks;
Public procedure ResolveTypeAliasesDescriptions;
Public procedure ExpandDescriptions;
Public procedure LoadDescriptionFiles(const c: TStringVector);
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure ParseAbbreviationsFile(const AFileName: string);
Protected function CodeString(const s: string): string; override;
Protected procedure WriteExternalCore(const ExternalItem: TExternalItem; const Id: TTranslationID); override;
Protected function FormatSection(HL: integer; const Anchor: string; const Caption: string): string; override;
Protected function FormatAnchor(const Anchor: string): string; override;
Protected function FormatList(ListData: TListData): string; override;
Protected function FormatTable(Table: TTableData): string; override;
Protected function ConvertString(const s: string): string; override;
Protected function ConvertChar(c: char): string; override;
Protected procedure WriteUnit(const HL: integer; const U: TPasUnit); override;
Public procedure WriteDocumentation; override;
Public function GetFileExtension: String; override;

Properties

Protected property CurrentStream: TStream read FCurrentStream;
Public property Units: TPasUnits read FUnits write FUnits;
Public property Introduction: TExternalItem read FIntroduction write FIntroduction;
Public property Conclusion: TExternalItem read FConclusion write FConclusion;
Public property AdditionalFiles: TExternalItemList read FAdditionalFiles write FAdditionalFiles;
Public property OnMessage: TPasDocMessageEvent read FOnMessage write FOnMessage;
Published property Language: TLanguageID read GetLanguage write SetLanguage default DEFAULT_LANGUAGE;
Published property ProjectName: string read FProjectName write FProjectName;
Published property ExcludeGenerator: Boolean read FExcludeGenerator write FExcludeGenerator default false;
Published property IncludeCreationTime: Boolean read FIncludeCreationTime write FIncludeCreationTime default false;
Published property UseLowercaseKeywords: Boolean read FUseLowercaseKeywords write FUseLowercaseKeywords default false;
Published property Title: string read FTitle write FTitle;
Published property DestinationDirectory: string read FDestDir write SetDestDir;
Published property OutputGraphVizUses: boolean read FGraphVizUses write FGraphVizUses default false;
Published property OutputGraphVizClassHierarchy: boolean read FGraphVizClasses write FGraphVizClasses default false;
Published property LinkGraphVizUses: string read FLinkGraphVizUses write FLinkGraphVizUses;
Published property LinkGraphVizClasses: string read FLinkGraphVizClasses write FLinkGraphVizClasses;
Published property Abbreviations: TStringList read FAbbreviations write SetAbbreviations;
Published property CheckSpelling: boolean read FCheckSpelling write FCheckSpelling default false;
Published property AspellLanguage: string read FAspellLanguage write FAspellLanguage;
Published property SpellCheckIgnoreWords: TStringList read FSpellCheckIgnoreWords write SetSpellCheckIgnoreWords;
Published property AutoAbstract: boolean read FAutoAbstract write FAutoAbstract default DefaultAutoAbstract;
Published property LinkLook: TLinkLook read FLinkLook write FLinkLook default llDefault;
Published property WriteUsesClause: boolean read FWriteUsesClause write FWriteUsesClause default false;
Published property AutoLink: boolean read FAutoLink write FAutoLink default false;
Published property AutoLinkExclude: TStringList read FAutoLinkExclude;
Published property ExternalClassHierarchy: TStrings read FExternalClassHierarchy write SetExternalClassHierarchy stored StoredExternalClassHierarchy;
Published property Markdown: boolean read FMarkdown write FMarkdown default false;
Published property ShowSourcePosition: boolean read FShowSourcePosition write FShowSourcePosition default false;
Published property SourceRoot: string read FSourceRoot write FSourceRoot;
Published property SourceUrlPattern: string read FSourceUrlPattern write FSourceUrlPattern;
Published property ToggleVisibilities: TVisibilities read FToggleVisibilities write FToggleVisibilities default [];
Published property SortSettings: TSortSettings read FSortSettings write FSortSettings default [];

Description

Constants

Public DefaultAutoAbstract = true;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 911).

Fields

Protected FLanguage: TPasDocLanguages;

This item is declared in ancestor TDocGenerator.

the (human) output language of the documentation file(s)

Source: source/component/PasDoc_Gen.pas (line 459).

Protected FClassHierarchy: TStringCardinalTree;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 461).

Protected FUnits: TPasUnits;

This item is declared in ancestor TDocGenerator.

list of all units that were successfully parsed

Source: source/component/PasDoc_Gen.pas (line 511).

Methods

Protected procedure DoError(const AMessage: string; const AArguments: array of const; const AExitCode: Word);

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 463).

Protected procedure DoMessage(const AVerbosity: Cardinal; const MessageType: TPasDocMessageType; const AMessage: string; const AArguments: array of const);

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 465).

Protected procedure CreateClassHierarchy;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 474).

Protected function MakeItemLink(const Item: TBaseItem; const LinkCaption: string; const LinkContext: TLinkContext): string; virtual;

This item is declared in ancestor TDocGenerator.

Return a link to item Item which will be displayed as LinkCaption. Returned string may be directly inserted inside output documentation. LinkCaption will be always converted using ConvertString before writing, so don't worry about doing this yourself when calling this method.

LinkContext may be used in some descendants to present the link differently, see TLinkContext for it's meaning.

If some output format doesn't support this feature, it can return simply ConvertString(LinkCaption). This is the default implementation of this method in this class.

Source: source/component/PasDoc_Gen.pas (line 487).

Protected procedure WriteCodeWithLinksCommon(const Item: TPasItem; const Code: string; WriteItemLink: boolean; const NameLinkBegin, NameLinkEnd: string);

This item is declared in ancestor TDocGenerator.

This writes Code as a Pascal code. Links inside the code are resolved from Item. If WriteItemLink then Item.Name is made a link. Item.Name is printed between NameLinkBegin and NameLinkEnd.

Source: source/component/PasDoc_Gen.pas (line 495).

Protected function HasSourcePosition(const AItem: TPasItem; out ItemName, ItemFilenameInRoot, ItemUrl: string): boolean;

This item is declared in ancestor TDocGenerator.

Utility to process information from TPasItem.SourceAbsoluteFileName and TPasItem.SourceLine and decide whether to show it. If True, then we should show it.

Parameters
ItemName
is the name to show.
ItemFilenameInRoot
is the filename, relative to SourceRoot, using always / on any system (even on Windows).
ItemUrl
is the URL to link to, if any (don't make a link if this is '').

Source: source/component/PasDoc_Gen.pas (line 507).

Protected procedure CloseStream;

This item is declared in ancestor TDocGenerator.

If field CurrentStream is assigned, it is disposed and set to nil.

Source: source/component/PasDoc_Gen.pas (line 514).

Protected function CreateLink(const Item: TBaseItem): string; virtual;

This item is declared in ancestor TDocGenerator.

This function is supposed to return a reference to an item, that is the name combined with some linking information like a hyperlink element in HTML or a page number in Tex.

Source: source/component/PasDoc_Gen.pas (line 539).

Protected function CreateStream(const AName: string): Boolean;

This item is declared in ancestor TDocGenerator.

Open output stream in the destination directory. If CurrentStream still exists (<> nil), it is closed. Then, a new output stream in the destination directory is created and assigned to CurrentStream. The file is overwritten if exists.

Use this only for text files that you want to write using WriteXxx methods of this class (like WriteConverted). There's no point to use if for other files.

Returns True if creation was successful, False otherwise. When it returns False, the error message was already shown by DoMessage.

Source: source/component/PasDoc_Gen.pas (line 552).

Protected function ExtractEmailAddress(s: string; out S1, S2, EmailAddress: string): Boolean;

This item is declared in ancestor TDocGenerator.

Searches for an email address in String S. Searches for first appearance of the @ character

Source: source/component/PasDoc_Gen.pas (line 556).

Protected function FixEmailaddressWithoutMailTo(const PossibleEmailAddress: String): String;

This item is declared in ancestor TDocGenerator.

Searches for an email address in PossibleEmailAddress and appends mailto: if it's an email address and mailto: wasn't provided. Otherwise it simply returns the input.

Needed to link email addresses properly which doesn't start with mailto:

Source: source/component/PasDoc_Gen.pas (line 563).

Protected function ExtractWebAddress(s: string; out S1, S2, WebAddress: string): Boolean;

This item is declared in ancestor TDocGenerator.

Searches for a web address in String S. It must either contain a http:// or start with www.

Source: source/component/PasDoc_Gen.pas (line 567).

Protected function FindGlobal(const NameParts: TNameParts): TBaseItem;

This item is declared in ancestor TDocGenerator.

Searches all items in all units (given by field Units) for item with NameParts. Returns a pointer to the item on success, nil otherwise.

Source: source/component/PasDoc_Gen.pas (line 572).

Protected function FindGlobalPasItem(const NameParts: TNameParts): TPasItem; overload;

This item is declared in ancestor TDocGenerator.

Find a Pascal item, searching global namespace. Returns Nil if not found.

Source: source/component/PasDoc_Gen.pas (line 576).

Protected function FindGlobalPasItem(const ItemName: String): TPasItem; overload;

This item is declared in ancestor TDocGenerator.

Find a Pascal item, searching global namespace. Assumes that Name is only one component (not something with dots inside). Returns Nil if not found.

Source: source/component/PasDoc_Gen.pas (line 581).

Protected function GetClassDirectiveName(const Directive: TClassDirective): string;

This item is declared in ancestor TDocGenerator.

GetClassDirectiveName returns ' abstract', or ' sealed' for classes that abstract or sealed respectively. GetClassDirectiveName is used by TTexDocGenerator and TGenericHTMLDocGenerator in writing the declaration of the class.

Source: source/component/PasDoc_Gen.pas (line 586).

Protected function GetCIOTypeName(const MyType: TCIOType): string;

This item is declared in ancestor TDocGenerator.

GetCIOTypeName writes a translation of MyType based on the current language. However, 'record' and 'packed record' are not translated.

Source: source/component/PasDoc_Gen.pas (line 590).

Protected procedure LoadDescriptionFile(n: string);

This item is declared in ancestor TDocGenerator.

Loads descriptions from file N and replaces or fills the corresponding comment sections of items.

Source: source/component/PasDoc_Gen.pas (line 594).

Protected function SearchItem(s: string; const Item: TBaseItem; WarningIfNotSplittable: boolean): TBaseItem;

This item is declared in ancestor TDocGenerator.

Searches for item with name S.

If S is not splittable by SplitNameParts, returns nil. If WarningIfNotSplittable, additionally does DoMessage with appropriate warning.

Else (if S is "splittable"), seeks for S (first trying Item.FindName, if Item is not nil, then trying FindGlobal). Returns nil if not found.

Source: source/component/PasDoc_Gen.pas (line 604).

Protected function SearchLink(s: string; const Item: TBaseItem; const LinkDisplay: string; const WarningIfLinkNotFound: TLinkNotFoundAction; out FoundItem: TBaseItem): string; overload;

This item is declared in ancestor TDocGenerator.

Searches for an item of name S which was linked in the description of Item. Starts search within item, then does a search on all items in all units using FindGlobal. Returns a link as String on success.

If S is not splittable by SplitNameParts, it always does DoMessage with appropriate warning and returns something like 'UNKNOWN' (no matter what is the value of WarningIfLinkNotFound). FoundItem will be set to nil in this case.

When item will not be found then:

  • if WarningIfLinkNotFound is true then it returns CodeString(ConvertString(S)) and makes DoMessage with appropriate warning.

  • else it returns '' (and does not do any DoMessage)

If LinkDisplay is not '', then it specifies explicite the display text for link. Else how exactly link does look like is controlled by LinkLook property.

Parameters
FoundItem
is the found item instance or nil if not found.

Source: source/component/PasDoc_Gen.pas (line 631).

Protected function SearchLink(s: string; const Item: TBaseItem; const LinkDisplay: string; const WarningIfLinkNotFound: TLinkNotFoundAction): string; overload;

This item is declared in ancestor TDocGenerator.

Just like previous overloaded version, but this doesn't return FoundItem (in case you don't need it).

Source: source/component/PasDoc_Gen.pas (line 638).

Protected procedure StoreDescription(ItemName: string; var t: string);

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 642).

Protected procedure WriteConverted(const s: string; Newline: boolean); overload;

This item is declared in ancestor TDocGenerator.

Writes S to CurrentStream, converting it using ConvertString. Then optionally writes LineEnding.

Source: source/component/PasDoc_Gen.pas (line 646).

Protected procedure WriteConverted(const s: string); overload;

This item is declared in ancestor TDocGenerator.

Writes S to CurrentStream, converting it using ConvertString. No LineEnding at the end.

Source: source/component/PasDoc_Gen.pas (line 650).

Protected procedure WriteConvertedLine(const s: string);

This item is declared in ancestor TDocGenerator.

Writes S to CurrentStream, converting it using ConvertString. Then writes LineEnding.

Source: source/component/PasDoc_Gen.pas (line 654).

Protected procedure WriteDirect(const t: string; Newline: boolean); overload;

This item is declared in ancestor TDocGenerator.

Simply writes T to CurrentStream, with optional LineEnding.

Source: source/component/PasDoc_Gen.pas (line 657).

Protected procedure WriteDirect(const t: string); overload;

This item is declared in ancestor TDocGenerator.

Simply writes T to CurrentStream.

Source: source/component/PasDoc_Gen.pas (line 660).

Protected procedure WriteDirectLine(const t: string);

This item is declared in ancestor TDocGenerator.

Simply writes T followed by LineEnding to CurrentStream.

Source: source/component/PasDoc_Gen.pas (line 663).

Protected procedure WriteUnits(const HL: integer);

This item is declared in ancestor TDocGenerator.

Writes documentation for all units, calling WriteUnit for each unit.

Source: source/component/PasDoc_Gen.pas (line 674).

Protected procedure WriteStartOfCode; virtual;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 676).

Protected procedure WriteEndOfCode; virtual;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 678).

Protected procedure WriteGVUses;

This item is declared in ancestor TDocGenerator.

output graphviz uses tree

Source: source/component/PasDoc_Gen.pas (line 681).

Protected procedure WriteGVClasses;

This item is declared in ancestor TDocGenerator.

output graphviz class tree

Source: source/component/PasDoc_Gen.pas (line 683).

Protected procedure StartSpellChecking(const AMode: string);

This item is declared in ancestor TDocGenerator.

starts the spell checker

Source: source/component/PasDoc_Gen.pas (line 686).

Protected procedure CheckString(const AString: string; const AErrors: TSpellingErrorList);

This item is declared in ancestor TDocGenerator.

If CheckSpelling and spell checking was successfully started, this will run FAspellProcess.CheckString and will report all errors using DoMessage with mtWarning.

Otherwise this just clears AErrors, which means that no errors were found.

Source: source/component/PasDoc_Gen.pas (line 694).

Protected procedure EndSpellChecking;

This item is declared in ancestor TDocGenerator.

closes the spellchecker

Source: source/component/PasDoc_Gen.pas (line 697).

Protected function FormatPascalCode(const Line: string): string; virtual;

This item is declared in ancestor TDocGenerator.

FormatPascalCode will cause Line to be formatted in the way that Pascal code is formatted in Delphi. Note that given Line is taken directly from what user put inside



, it is not even processed by ConvertString. You should process it with ConvertString if you want.

Source: source/component/PasDoc_Gen.pas (line 704).

Protected function FormatNormalCode(AString: string): string; virtual;

This item is declared in ancestor TDocGenerator.

This will cause AString to be formatted in the way that normal Pascal statements (not keywords, strings, comments, etc.) look in Delphi.

Source: source/component/PasDoc_Gen.pas (line 709).

Protected function FormatComment(AString: string): string; virtual;

This item is declared in ancestor TDocGenerator.

FormatComment will cause AString to be formatted in the way that comments other than compiler directives are formatted in Delphi. See: FormatCompilerComment.

Source: source/component/PasDoc_Gen.pas (line 714).

Protected function FormatHex(AString: string): string; virtual;

This item is declared in ancestor TDocGenerator.

FormatHex will cause AString to be formatted in the way that Hex are formatted in Delphi.

Source: source/component/PasDoc_Gen.pas (line 718).

Protected function FormatNumeric(AString: string): string; virtual;

This item is declared in ancestor TDocGenerator.

FormatNumeric will cause AString to be formatted in the way that Numeric are formatted in Delphi.

Source: source/component/PasDoc_Gen.pas (line 722).

Protected function FormatFloat(AString: string): string; virtual;

This item is declared in ancestor TDocGenerator.

FormatFloat will cause AString to be formatted in the way that Float are formatted in Delphi.

Source: source/component/PasDoc_Gen.pas (line 726).

Protected function FormatString(AString: string): string; virtual;

This item is declared in ancestor TDocGenerator.

FormatString will cause AString to be formatted in the way that strings are formatted in Delphi.

Source: source/component/PasDoc_Gen.pas (line 730).

Protected function FormatKeyWord(AString: string): string; virtual;

This item is declared in ancestor TDocGenerator.

FormatKeyWord will cause AString to be formatted in the way that reserved words are formatted in Delphi.

Source: source/component/PasDoc_Gen.pas (line 734).

Protected function FormatCompilerComment(AString: string): string; virtual;

This item is declared in ancestor TDocGenerator.

FormatCompilerComment will cause AString to be formatted in the way that compiler directives are formatted in Delphi.

Source: source/component/PasDoc_Gen.pas (line 738).

Protected function Paragraph: string; virtual;

This item is declared in ancestor TDocGenerator.

This is paragraph marker in output documentation.

Default implementation in this class simply returns ' ' (one space).

Source: source/component/PasDoc_Gen.pas (line 744).

Protected function ShortDash: string; virtual;

This item is declared in ancestor TDocGenerator.

See TTagManager.ShortDash. Default implementation in this class returns '-'.

Source: source/component/PasDoc_Gen.pas (line 748).

Protected function EnDash: string; virtual;

This item is declared in ancestor TDocGenerator.

See TTagManager.EnDash. Default implementation in this class returns '--'.

Source: source/component/PasDoc_Gen.pas (line 752).

Protected function EmDash: string; virtual;

This item is declared in ancestor TDocGenerator.

See TTagManager.EmDash. Default implementation in this class returns '---'.

Source: source/component/PasDoc_Gen.pas (line 756).

Protected function HtmlString(const S: string): string; virtual;

This item is declared in ancestor TDocGenerator.

Process HTML content, like provided by the @html tag. Override this function to decide what to put in output on such thing.

Note that S is not processed in any way, even with ConvertString. So you're able to copy user's input inside @html() verbatim to the output.

The default implementation is this class simply discards it, i.e. returns always ''. Generators that know what to do with HTML can override this with simple "Result := S".

Source: source/component/PasDoc_Gen.pas (line 768).

Protected function LatexString(const S: string): string; virtual;

This item is declared in ancestor TDocGenerator.

Process LaTeX content, like provided by the @latex tag.

The default implementation is this class simply discards it, i.e. returns always ''. Generators that know what to do with raw LaTeX markup can override this with simple "Result := S".

Source: source/component/PasDoc_Gen.pas (line 775).

Protected function LineBreak: string; virtual;

This item is declared in ancestor TDocGenerator.

Markup that forces line break in given output format (e.g. '<br>' in html or '\\' in LaTeX).

It is used on
tag (but may also be used on other occasions in the future).

In this class it returns '', because it's valid for an output generator to simply ignore
tags if linebreaks can't be expressed in given output format.

Source: source/component/PasDoc_Gen.pas (line 786).

Protected function URLLink(const URL: string): string; overload; virtual;

This item is declared in ancestor TDocGenerator.

Markup to display URL in a description. E.g. HTML generator will want to wrap this in <a href="...">...</a>.

Note that passed here URL is not processed by ConvertString (because sometimes it could be undesirable). If you want you can process URL with ConvertString when overriding this method.

Default implementation in this class simply returns ConvertString(URL). This is good if your documentation format does not support anything like URL links.

Source: source/component/PasDoc_Gen.pas (line 800).

Protected function URLLink(const URL, LinkDisplay: string): string; overload; virtual;

This item is declared in ancestor TDocGenerator.

Text which will be shown for an URL tag.

URL is a link to a website or e-mail address. LinkDisplay is an optional parameter which will be used as the display name of the URL.

Source: source/component/PasDoc_Gen.pas (line 806).

Protected procedure WriteExternal(const ExternalItem: TExternalItem; const Id: TTranslationID);

This item is declared in ancestor TDocGenerator.

Write the introduction and conclusion of the project.

Source: source/component/PasDoc_Gen.pas (line 809).

Protected procedure WriteConclusion;

This item is declared in ancestor TDocGenerator.

Writes a conclusion for the project. See WriteExternal.

Source: source/component/PasDoc_Gen.pas (line 825).

Protected procedure WriteIntroduction;

This item is declared in ancestor TDocGenerator.

Writes an introduction for the project. See WriteExternal.

Source: source/component/PasDoc_Gen.pas (line 829).

Protected procedure WriteAdditionalFiles;

This item is declared in ancestor TDocGenerator.

Writes the other files for the project. See WriteExternal.

Source: source/component/PasDoc_Gen.pas (line 833).

Protected function FormatBold(const Text: string): string; virtual;

This item is declared in ancestor TDocGenerator.

Return Text formatted using bold font.

Given Text is already in the final output format (with characters converted using ConvertString, @-tags expanded etc.).

Implementation of this method in this class simply returns Result := Text. Output generators that can somehow express bold formatting (or at least emphasis of some text) should override this.

See also
FormatItalic
Return Text formatted using italic font.

Source: source/component/PasDoc_Gen.pas (line 853).

Protected function FormatItalic(const Text: string): string; virtual;

This item is declared in ancestor TDocGenerator.

Return Text formatted using italic font. Analogous to FormatBold.

Source: source/component/PasDoc_Gen.pas (line 857).

Protected function FormatWarning(const Text: string): string; virtual;

This item is declared in ancestor TDocGenerator.

Return Text using bold font by calling FormatBold(Text).

Source: source/component/PasDoc_Gen.pas (line 860).

Protected function FormatNote(const Text: string): string; virtual;

This item is declared in ancestor TDocGenerator.

Return Text using italic font by calling FormatItalic(Text).

Source: source/component/PasDoc_Gen.pas (line 863).

Protected function FormatPreformatted(const Text: string): string; virtual;

This item is declared in ancestor TDocGenerator.

Return Text preserving spaces and line breaks. Note that Text passed here is not yet converted with ConvertString. The implementation of this method in this class just returns ConvertString(Text).

Source: source/component/PasDoc_Gen.pas (line 869).

Protected function FormatImage(FileNames: TStringList): string; virtual;

This item is declared in ancestor TDocGenerator.

Return markup to show an image. FileNames is a list of possible filenames of the image. FileNames always contains at least one item (i.e. FileNames.Count >= 1), never contains empty lines (i.e. Trim(FileNames[I]) <> ''), and contains only absolute filenames.

E.g. HTML generator will want to choose the best format for HTML, then somehow copy the image from FileNames[Chosen] and wrap this in <img src="...">.

Implementation of this method in this class simply shows FileNames[0]. Output generators should override this.

Source: source/component/PasDoc_Gen.pas (line 883).

Protected function FormatTableOfContents(Sections: TStringPairVector): string; virtual;

This item is declared in ancestor TDocGenerator.

Override this if you want to insert something on @tableOfContents tag. As a parameter you get already prepared tree of sections that your table of contents should show. Each item of Sections is a section on the level 1. Item's Name is section name, item's Value is section caption, item's Data is a TStringPairVector instance that describes subsections (on level 2) below this section. And so on, recursively.

Sections given here are never nil, and item's Data is never nil. But of course they may contain 0 items, and this should be a signal to you that given section doesn't have any subsections.

Default implementation of this method in this class just returns empty string.

Source: source/component/PasDoc_Gen.pas (line 908).

Public procedure BuildLinks;

This item is declared in ancestor TDocGenerator.

Creates anchors and links for all items in all units.

Source: source/component/PasDoc_Gen.pas (line 914).

Public procedure ResolveTypeAliasesDescriptions;

This item is declared in ancestor TDocGenerator.

For type aliases with empty RawDescription, copy the RawDescription from the aliased type. Do this only after BuildLinks to be able to follow type aliases.

Source: source/component/PasDoc_Gen.pas (line 920).

Public procedure ExpandDescriptions;

This item is declared in ancestor TDocGenerator.

Expands description for each item in each unit of Units. "Expands description" means that TTagManager.Execute is called, and item's DetailedDescription, AbstractDescription, AbstractDescriptionWasAutomatic (and many others, set by @-tags handlers) properties are calculated.

Source: source/component/PasDoc_Gen.pas (line 927).

Public procedure LoadDescriptionFiles(const c: TStringVector);

This item is declared in ancestor TDocGenerator.

Assumes C contains file names as PString variables. Calls LoadDescriptionFile with each file name.

Source: source/component/PasDoc_Gen.pas (line 935).

Public constructor Create(AOwner: TComponent); override;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 944).

Public destructor Destroy; override;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 945).

Public procedure ParseAbbreviationsFile(const AFileName: string);

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 947).

Protected function CodeString(const s: string): string; override;

Overrides of ancestor abstract methods, not really used by PHP generation. As we output only a simple map (name->html_filename) for PHP now, we don't really use most of these methods. But we override them, as they are absract in ancestor.

Source: source/component/PasDoc_GenPHP.pas (line 56).

Protected procedure WriteExternalCore(const ExternalItem: TExternalItem; const Id: TTranslationID); override;

This item has no description. Showing description inherited from TDocGenerator.WriteExternalCore.

This is called from WriteExternal when ExternalItem.Title and ShortTitle are already set, message about generating appropriate item is printed etc. This should write ExternalItem, including ExternalItem.DetailedDescription, ExternalItem.Authors, ExternalItem.Created, ExternalItem.LastMod.

Source: source/component/PasDoc_GenPHP.pas (line 57).

Protected function FormatSection(HL: integer; const Anchor: string; const Caption: string): string; override;

This item has no description. Showing description inherited from TDocGenerator.FormatSection.

Writes a section heading and a link-anchor.

Source: source/component/PasDoc_GenPHP.pas (line 59).

Protected function FormatAnchor(const Anchor: string): string; override;

This item has no description. Showing description inherited from TDocGenerator.FormatAnchor.

Writes a link-anchor.

Source: source/component/PasDoc_GenPHP.pas (line 61).

Protected function FormatList(ListData: TListData): string; override;

This item has no description. Showing description inherited from TDocGenerator.FormatList.

Format a list from given ListData.

Source: source/component/PasDoc_GenPHP.pas (line 62).

Protected function FormatTable(Table: TTableData): string; override;

This item has no description. Showing description inherited from TDocGenerator.FormatTable.

Return appropriate content for given Table. It's guaranteed that the Table passed here will have at least one row and in each row there will be at least one cell, so you don't have to check it within descendants.

Source: source/component/PasDoc_GenPHP.pas (line 63).

Protected function ConvertString(const s: string): string; override;

Overrides actually used.

Source: source/component/PasDoc_GenPHP.pas (line 66).

Protected function ConvertChar(c: char): string; override;

This item has no description. Showing description inherited from TDocGenerator.ConvertChar.

Converts a character to its converted form. This method should always be called to add characters to a string.

@ should also be converted by this routine.

Source: source/component/PasDoc_GenPHP.pas (line 67).

Protected procedure WriteUnit(const HL: integer; const U: TPasUnit); override;

This item has no description. Showing description inherited from TDocGenerator.WriteUnit.

Abstract method that writes all documentation for a single unit U to output, starting at heading level HL. Implementation must be provided by descendant objects and is dependent on output format.

Source: source/component/PasDoc_GenPHP.pas (line 68).

Public procedure WriteDocumentation; override;

This item has no description. Showing description inherited from TDocGenerator.WriteDocumentation.

Must be overwritten, writes all documentation. Will create either a single file or one file for each unit and each class, interface or object, depending on output format.

Source: source/component/PasDoc_GenPHP.pas (line 70).

Public function GetFileExtension: String; override;

This item has no description. Showing description inherited from TDocGenerator.GetFileExtension.

Abstract function that provides file extension for documentation format. Must be overwritten by descendants.

Source: source/component/PasDoc_GenPHP.pas (line 71).

Properties

Protected property CurrentStream: TStream read FCurrentStream;

This item is declared in ancestor TDocGenerator.

Output stream that is currently written to; depending on the output format, more than one output stream may be necessary to store all documentation.

Source: source/component/PasDoc_Gen.pas (line 472).

Public property Units: TPasUnits read FUnits write FUnits;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 942).

Public property Introduction: TExternalItem read FIntroduction write FIntroduction;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 949).

Public property Conclusion: TExternalItem read FConclusion write FConclusion;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 951).

Public property AdditionalFiles: TExternalItemList read FAdditionalFiles write FAdditionalFiles;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 952).

Public property OnMessage: TPasDocMessageEvent read FOnMessage write FOnMessage;

This item is declared in ancestor TDocGenerator.

Callback receiving messages from generator.

This is usually used internally by TPasDoc class, that assigns it's internal callback here when using this generator. Also, for the above reason, do not make this published.

See TPasDoc.OnMessage for something more useful for final programs.

Source: source/component/PasDoc_Gen.pas (line 961).

Published property Language: TLanguageID read GetLanguage write SetLanguage default DEFAULT_LANGUAGE;

This item is declared in ancestor TDocGenerator.

the (human) output language of the documentation file(s)

Source: source/component/PasDoc_Gen.pas (line 964).

Published property ProjectName: string read FProjectName write FProjectName;

This item is declared in ancestor TDocGenerator.

Name of the project to create.

Source: source/component/PasDoc_Gen.pas (line 967).

Published property ExcludeGenerator: Boolean read FExcludeGenerator write FExcludeGenerator default false;

This item is declared in ancestor TDocGenerator.

"Generator info" are things that can change with each invocation of pasdoc, with different pasdoc binary etc.

This includes

  • pasdoc's compiler name and version,

  • pasdoc's version and time of compilation

See --exclude-generator documentation. Default value is false (i.e. show them), as this information is generally considered useful.

Setting this to true is useful for automatically comparing two versions of pasdoc's output (e.g. when trying to automate pasdoc's tests).

Source: source/component/PasDoc_Gen.pas (line 985).

Published property IncludeCreationTime: Boolean read FIncludeCreationTime write FIncludeCreationTime default false;

This item is declared in ancestor TDocGenerator.

Show creation time in the output.

Source: source/component/PasDoc_Gen.pas (line 989).

Published property UseLowercaseKeywords: Boolean read FUseLowercaseKeywords write FUseLowercaseKeywords default false;

This item is declared in ancestor TDocGenerator.

Setting to define how literal tag keywords should appear in documentaion.

Source: source/component/PasDoc_Gen.pas (line 993).

Published property Title: string read FTitle write FTitle;

This item is declared in ancestor TDocGenerator.

Title of the documentation, supplied by user. May be empty. See TPasDoc.Title.

Source: source/component/PasDoc_Gen.pas (line 998).

Published property DestinationDirectory: string read FDestDir write SetDestDir;

This item is declared in ancestor TDocGenerator.

Destination directory for documentation. Must include terminating forward slash or backslash so that valid file names can be created by concatenating DestinationDirectory and a pathless file name.

Source: source/component/PasDoc_Gen.pas (line 1003).

Published property OutputGraphVizUses: boolean read FGraphVizUses write FGraphVizUses default false;

This item is declared in ancestor TDocGenerator.

generate a GraphViz diagram for the units dependencies

Source: source/component/PasDoc_Gen.pas (line 1006).

Published property OutputGraphVizClassHierarchy: boolean read FGraphVizClasses write FGraphVizClasses default false;

This item is declared in ancestor TDocGenerator.

generate a GraphViz diagram for the Class hierarchy

Source: source/component/PasDoc_Gen.pas (line 1009).

Published property LinkGraphVizUses: string read FLinkGraphVizUses write FLinkGraphVizUses;

This item is declared in ancestor TDocGenerator.

link the GraphViz uses diagram

Source: source/component/PasDoc_Gen.pas (line 1012).

Published property LinkGraphVizClasses: string read FLinkGraphVizClasses write FLinkGraphVizClasses;

This item is declared in ancestor TDocGenerator.

link the GraphViz classes diagram

Source: source/component/PasDoc_Gen.pas (line 1014).

Published property Abbreviations: TStringList read FAbbreviations write SetAbbreviations;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 1016).

Published property CheckSpelling: boolean read FCheckSpelling write FCheckSpelling default false;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 1018).

Published property AspellLanguage: string read FAspellLanguage write FAspellLanguage;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 1021).

Published property SpellCheckIgnoreWords: TStringList read FSpellCheckIgnoreWords write SetSpellCheckIgnoreWords;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 1023).

Published property AutoAbstract: boolean read FAutoAbstract write FAutoAbstract default DefaultAutoAbstract;

This item is declared in ancestor TDocGenerator.

Automatically detect abstract (summary) descriptions without @abstract tag. See --auto-abstract command-line option docs on https://pasdoc.github.io/Abstract . This is used in ExpandDescriptions.

Source: source/component/PasDoc_Gen.pas (line 1029).

Published property LinkLook: TLinkLook read FLinkLook write FLinkLook default llDefault;

This item is declared in ancestor TDocGenerator.

How SearchLink behaves. This meaning is described in --link-look documentation.

Source: source/component/PasDoc_Gen.pas (line 1034).

Published property WriteUsesClause: boolean read FWriteUsesClause write FWriteUsesClause default false;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 1036).

Published property AutoLink: boolean read FAutoLink write FAutoLink default false;

This item is declared in ancestor TDocGenerator.

Automatically link identifiers to their documentation, even without @link tags. See --auto-link documentation.

Source: source/component/PasDoc_Gen.pas (line 1041).

Published property AutoLinkExclude: TStringList read FAutoLinkExclude;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 1044).

Published property ExternalClassHierarchy: TStrings read FExternalClassHierarchy write SetExternalClassHierarchy stored StoredExternalClassHierarchy;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 1046).

Published property Markdown: boolean read FMarkdown write FMarkdown default false;

This item is declared in ancestor TDocGenerator.

This item has no description.

Source: source/component/PasDoc_Gen.pas (line 1050).

Published property ShowSourcePosition: boolean read FShowSourcePosition write FShowSourcePosition default false;

This item is declared in ancestor TDocGenerator.

Show source filename and line number in documentation output.

Source: source/component/PasDoc_Gen.pas (line 1054).

Published property SourceRoot: string read FSourceRoot write FSourceRoot;

This item is declared in ancestor TDocGenerator.

Root path for source files. Used to make relative paths, shown by ShowSourcePosition and replaced by SourceUrlPattern. Leave empty to make ShowSourcePosition and SourceUrlPattern just take the final filename part to show / replace.

Source: source/component/PasDoc_Gen.pas (line 1063).

Published property SourceUrlPattern: string read FSourceUrlPattern write FSourceUrlPattern;

This item is declared in ancestor TDocGenerator.

URL pattern for linking source positions. Use {FILE} for filename and {LINE} for line number. When set, source positions in the output become clickable links. Example: https://github.com/owner/repo/blob/main/{FILE}#L{LINE}

Source: source/component/PasDoc_Gen.pas (line 1070).

Published property ToggleVisibilities: TVisibilities read FToggleVisibilities write FToggleVisibilities default [];

This item is declared in ancestor TDocGenerator.

Visibilities that should be included in output but hidden by default in HTML, with checkboxes to toggle their display.

Source: source/component/PasDoc_Gen.pas (line 1075).

Published property SortSettings: TSortSettings read FSortSettings write FSortSettings default [];

This item is declared in ancestor TDocGenerator.

How items should be sorted in output. See --sort documentation.

The TPasDoc sorts the items in Units before executing our WriteDocumentation, so TDocGenerator usually doesn't need to worry about sorting anymore... Except if output rearranges/sums items, like HTML output does for InheritedMembers<>imNever, in which case they need to be sorted again.

Source: source/component/PasDoc_Gen.pas (line 1087).


Generated by PasDoc 1.0.2.