Unit PasDoc_Types

Description

Basic types.

Source: source/component/PasDoc_Types.pas (line 27).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EPasDoc Exception raised in many situations when PasDoc encounters an error.

Functions and Procedures

function SplitNameParts(S: string; out NameParts: TNameParts): Boolean;
function StripNamePart(const NameParts: TNameParts): TNameParts;
function IsValidMultipartName(S: string): boolean;
function OneNamePart(const S: string): TNameParts;
function GlueNameParts(const NameParts: TNameParts): string;
function StringToImplicitVisibility(const S: String): TImplicitVisibility;

Types

TBytes = array of Byte;
UnicodeString = WideString;
RawByteString = AnsiString;
TStringArray = TStringDynArray;
TNameParts = TStringArray;
TPasDocMessageType = (...);
TPasDocMessageEvent = procedure(const MessageType: TPasDocMessageType; const AMessage: string; const AVerbosity: Cardinal) of object;
TCharSet = set of AnsiChar;
TImplicitVisibility = (...);

Description

Functions and Procedures

function SplitNameParts(S: string; out NameParts: TNameParts): Boolean;

Splits S, which can be made of any number of parts, separated by dots (Delphi namespaces, like PasDoc.Output.HTML.TWriter.Write). If S is not a valid identifier, False is returned, otherwise True is returned and splitted name is returned as NameParts.

Source: source/component/PasDoc_Types.pas (line 107).

function StripNamePart(const NameParts: TNameParts): TNameParts;

Strip one name part. Only call when we have at least 2 parts.

Source: source/component/PasDoc_Types.pas (line 110).

function IsValidMultipartName(S: string): boolean;

Checks that the string is a valid multipart identifier

Source: source/component/PasDoc_Types.pas (line 113).

function OneNamePart(const S: string): TNameParts;

Simply returns an array with Length = 1 and one item = S.

TODO: This function, and all its usage, should be removed. Reason: all identifiers across Pascal code are potentially qualified. Using this function right now means e.g. that using ancestor names with qualified identifiers, like "TMyClass = class(OtherUnit.TAncestor)", is not resolved fully (they are not linked everywhere they should be).

Source: source/component/PasDoc_Types.pas (line 122).

function GlueNameParts(const NameParts: TNameParts): string;

Simply concatenates all NameParts with dot.

Source: source/component/PasDoc_Types.pas (line 125).

function StringToImplicitVisibility(const S: String): TImplicitVisibility;

This item has no description.

Source: source/component/PasDoc_Types.pas (line 132).

Types

TBytes = array of Byte;

This item has no description.

Source: source/component/PasDoc_Types.pas (line 38).

UnicodeString = WideString;

This item has no description.

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

RawByteString = AnsiString;

This item has no description.

Source: source/component/PasDoc_Types.pas (line 42).

TStringArray = TStringDynArray;

Dynamic array of String.

Source: source/component/PasDoc_Types.pas (line 53).

TNameParts = TStringArray;

Qualified name of a Pascal item.

User supplies such name by separating each part with dot, e.g. 'UnitName.ClassName.MethodName', then SplitNameParts converts it to TNameParts like ['UnitName', 'ClassName', 'MethodName'].

Note that in case of unit names with dots, the item on this list may also contain a dot inside, if it's determined to be a name of unit with dot. Like this: ['Unit.Name.With.Dot', 'ClassName', 'MethodName']. We have special code to do this in TDocGenerator.FindGlobal .

The idea is that each string corresponds to some TBaseItem.Name.

Use such list for searching routines, for TBaseItem.FindItem and friends.

This must always have at least one part.

There is no limit on the maximum length of TNameParts, since we can have arbitrary number of parts with nested classes, like "MyUnit.TMyClass.TMyNestedClass.TAnotherNestedClass.TOriginalType".

Source: source/component/PasDoc_Types.pas (line 76).

TPasDocMessageType = (...);

Message type to send with TPasDocMessageEvent.

Values
  • pmtPlainText
  • pmtInformation
  • pmtWarning
  • pmtError

Source: source/component/PasDoc_Types.pas (line 79).

TPasDocMessageEvent = procedure(const MessageType: TPasDocMessageType; const AMessage: string; const AVerbosity: Cardinal) of object;

Callback to send a message from one class and react to it in another.

TCharSet = set of AnsiChar;

Set of AnsiChars.

Source: source/component/PasDoc_Types.pas (line 86).

TImplicitVisibility = (...);

See command-line option --implicit-visibility documentation at --implicit-visibility documentation.

Values
  • ivPublic
  • ivPublished
  • ivImplicit

Source: source/component/PasDoc_Types.pas (line 130).

Authors


Generated by PasDoc 1.0.2.