Class TSimpleXMLDocGenerator

Unit

Declaration

type TSimpleXMLDocGenerator = class(TDocGenerator)

Description

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

Base generator class, to be specialized for specific output formats. This abstract object will do the complete process of writing documentation files. It will be given the collection of units that was the result of the parsing process and a configuration object that was created from default values and program parameters. Depending on the output format, one or more files may be created (HTML will create several, Tex only one).

Source: source/component/PasDoc_GenSimpleXML.pas (line 41).

Hierarchy

Overview

Methods

Protected function CodeString(const s: string): 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;
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 FormatTable(Table: TTableData): string; override;
Protected function FormatList(ListData: TListData): string; override;
Protected function FormatBold(const Text: string): string; override;
Protected function FormatItalic(const Text: string): string; override;
Public procedure WriteDocumentation; override;
Public function GetFileExtension: string; override;

Description

Methods

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

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

Return S formatted to look like code, e.g. <code>xxx</code> in HTML.

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

Source: source/component/PasDoc_GenSimpleXML.pas (line 43).

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

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

Converts for each character in S, thus assembling a String that is returned and can be written to the documentation file.

The @ character should not be converted, this will be done later on.

Source: source/component/PasDoc_GenSimpleXML.pas (line 44).

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_GenSimpleXML.pas (line 45).

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_GenSimpleXML.pas (line 46).

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_GenSimpleXML.pas (line 48).

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_GenSimpleXML.pas (line 50).

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_GenSimpleXML.pas (line 52).

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_GenSimpleXML.pas (line 53).

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_GenSimpleXML.pas (line 54).

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

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

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.

Source: source/component/PasDoc_GenSimpleXML.pas (line 55).

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

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

Return Text formatted using italic font. Analogous to FormatBold.

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

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_GenSimpleXML.pas (line 82).

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_GenSimpleXML.pas (line 83).


Generated by PasDoc 0.17.0.snapshot.