Class TPasEnum
Unit
Declaration
type TPasEnum = class(TPasType)
Description
Enumerated type.
Source: source/component/PasDoc_Items.pas (line 674).
Hierarchy
- TObject
- TSerializable
- TBaseItem
- TPasItem
- TPasType
- TPasEnum
Overview
Fields
| Protected | FMembers: TPasItems; |
Methods
| Protected | procedure Serialize(const ADestination: TStream); virtual; |
| Protected | procedure Deserialize(const ASource: TStream); virtual; |
| Public | class function Read7BitEncodedInt(const ASource: TStream): Integer; |
| Public | class procedure Write7BitEncodedInt(Value: Integer; const ADestination: TStream); |
| Public | class function LoadStringFromStream(const ASource: TStream): string; |
| Public | class procedure SaveStringToStream(const AValue: string; const ADestination: TStream); |
| Public | class function LoadDoubleFromStream(const ASource: TStream): double; |
| Public | class procedure SaveDoubleToStream(const AValue: double; const ADestination: TStream); |
| Public | class function LoadIntegerFromStream(const ASource: TStream): Longint; |
| Public | class procedure SaveIntegerToStream(const AValue: Longint; const ADestination: TStream); |
| Public | constructor Create; virtual; |
| Public | class procedure SerializeObject(const AObject: TSerializable; const ADestination: TStream); |
| Public | class function DeserializeObject(const ASource: TStream): TSerializable; |
| Public | class procedure Register(const AClass: TSerializableClass); |
| Public | procedure SerializeToFile(const AFileName: string); |
| Public | class function DeserializeFromFile(const AFileName: string): TSerializable; |
| Protected | procedure Serialize(const ADestination: TStream); override; |
| Protected | procedure Deserialize(const ASource: TStream); override; |
| Public | constructor Create; override; |
| Public | destructor Destroy; override; |
| Public | procedure RegisterTags(TagManager: TTagManager); virtual; |
| Public | function FindItem(const NameParts: TNameParts): TBaseItem; virtual; |
| Public | function FindItemMaybeInAncestors(const NameParts: TNameParts): TBaseItem; virtual; |
| Public | function FindName(const NameParts: TNameParts): TBaseItem; virtual; |
| Public | function RawDescriptionInfo: PRawDescriptionInfo; |
| Public | function QualifiedName: String; virtual; |
| Public | function BasePath: string; virtual; |
| Public | function Signature: string; virtual; |
| Protected | procedure Serialize(const ADestination: TStream); override; |
| Protected | procedure Deserialize(const ASource: TStream); override; |
| Protected | function FindNameWithinUnit(const NameParts: TNameParts): TBaseItem; virtual; |
| Public | constructor Create; override; |
| Public | destructor Destroy; override; |
| Public | function FindName(const NameParts: TNameParts): TBaseItem; override; |
| Public | procedure RegisterTags(TagManager: TTagManager); override; |
| Public | function HasDescription: Boolean; |
| Public | function HasRawDescription: Boolean; |
| Public | function QualifiedName: String; override; |
| Public | function UnitRelativeQualifiedName: string; virtual; |
| Public | procedure Sort(const SortSettings: TSortSettings); virtual; |
| Public | procedure SetAttributes(var Value: TStringPairVector); |
| Public | function InheritedItem: TPasItem; virtual; |
| Public | function GetInheritedItemDescriptions: TStringPairVector; virtual; |
| Public | function BasePath: string; override; |
| Public | function HasOptionalInfo: boolean; virtual; |
| Public | function IsOverride: Boolean; virtual; |
| Protected | procedure Serialize(const ADestination: TStream); override; |
| Protected | procedure Deserialize(const ASource: TStream); override; |
| Protected | procedure StoreValueTag(ThisTag: TTag; var ThisTagData: TObject; EnclosingTag: TTag; var EnclosingTagData: TObject; const TagParameter: string; var ReplaceStr: string); |
| Public | procedure RegisterTags(TagManager: TTagManager); override; |
| Public | function FindItem(const NameParts: TNameParts): TBaseItem; override; |
| Public | destructor Destroy; override; |
| Public | constructor Create; override; |
Properties
| Public | property WasDeserialized: boolean read FWasDeserialized; |
| Public | property DetailedDescription: string
read FDetailedDescription write FDetailedDescription; |
| Public | property RawDescription: string
read GetRawDescription write WriteRawDescription; |
| Public | property FullLink: string read FFullLink write FFullLink; |
| Public | property LastMod: string read FLastMod write FLastMod; |
| Public | property Name: string read FName write FName; |
| Public | property Authors: TStringVector read FAuthors write SetAuthors; |
| Public | property Created: string read FCreated; |
| Public | property AutoLinkHereAllowed: boolean
read FAutoLinkHereAllowed write FAutoLinkHereAllowed default true; |
| Public | property AbstractDescription: string
read FAbstractDescription write FAbstractDescription; |
| Public | property AbstractDescriptionWasAutomatic: boolean
read FAbstractDescriptionWasAutomatic
write FAbstractDescriptionWasAutomatic; |
| Public | property MyUnit: TPasUnit read FMyUnit write FMyUnit; |
| Public | property MyObject: TPasCio read FMyObject write FMyObject; |
| Public | property MyEnum: TPasEnum read FMyEnum write FMyEnum; |
| Public | property Visibility: TVisibility read FVisibility write FVisibility; |
| Public | property HintDirectives: THintDirectives read FHintDirectives write FHintDirectives; |
| Public | property DeprecatedNote: string
read FDeprecatedNote write FDeprecatedNote; |
| Public | property FullDeclaration: string read FFullDeclaration write FFullDeclaration; |
| Public | property SeeAlso: TStringPairVector read FSeeAlso; |
| Public | property Attributes: TStringPairVector read FAttributes; |
| Public | property Params: TStringPairVector read FParams; |
| Public | property Raises: TStringPairVector read FRaises; |
| Public | property SourceAbsoluteFileName: string
read FSourceAbsoluteFileName write FSourceAbsoluteFileName; |
| Public | property SourceLine: Integer read FSourceLine write FSourceLine; |
| Public | property Members: TPasItems read FMembers; |
Description
Fields
| Protected | FMembers: TPasItems; |
|
This item has no description. | |
Methods
| Protected | procedure Serialize(const ADestination: TStream); virtual; |
|
This item has no description. | |
| Protected | procedure Deserialize(const ASource: TStream); virtual; |
|
This item has no description. | |
| Public | class function Read7BitEncodedInt(const ASource: TStream): Integer; |
|
This item has no description. | |
| Public | class procedure Write7BitEncodedInt(Value: Integer; const ADestination: TStream); |
|
This item has no description. | |
| Public | class function LoadStringFromStream(const ASource: TStream): string; |
|
This item has no description. | |
| Public | class procedure SaveStringToStream(const AValue: string; const ADestination: TStream); |
|
This item has no description. | |
| Public | class function LoadDoubleFromStream(const ASource: TStream): double; |
|
This item has no description. | |
| Public | class procedure SaveDoubleToStream(const AValue: double; const ADestination: TStream); |
|
This item has no description. | |
| Public | class function LoadIntegerFromStream(const ASource: TStream): Longint; |
|
This item has no description. | |
| Public | class procedure SaveIntegerToStream(const AValue: Longint; const ADestination: TStream); |
|
This item has no description. | |
| Public | constructor Create; virtual; |
|
This item has no description. | |
| Public | class procedure SerializeObject(const AObject: TSerializable; const ADestination: TStream); |
|
This item has no description. | |
| Public | class function DeserializeObject(const ASource: TStream): TSerializable; |
|
This item has no description. | |
| Public | class procedure Register(const AClass: TSerializableClass); |
|
This item has no description. | |
| Public | procedure SerializeToFile(const AFileName: string); |
|
This item has no description. | |
| Public | class function DeserializeFromFile(const AFileName: string): TSerializable; |
|
Read back from file. Exceptions raised
| |
| Protected | procedure Serialize(const ADestination: TStream); override; |
|
Serialization of TPasItem need to store in stream only data that is generated by parser. That's because current approach treats "loading from cache" as equivalent to parsing a unit and stores to cache right after parsing a unit. So what is generated by parser must be written to cache. That said,
| |
| Protected | procedure Deserialize(const ASource: TStream); override; |
|
This item has no description. | |
| Public | constructor Create; override; |
|
This item has no description. | |
| Public | destructor Destroy; override; |
|
This item has no description. | |
| Public | procedure RegisterTags(TagManager: TTagManager); virtual; |
|
It registers TTags that init Authors, Created, LastMod and remove relevant tags from description. You can override it to add more handlers. | |
| Public | function FindItem(const NameParts: TNameParts): TBaseItem; virtual; |
|
Search for an item with name NameParts inside this Pascal item. For units, it searches for items declared inside this unit (like a procedure, or a class in this unit). For classes it searches for items declared within this class (like a method or a property). For an enumerated type, it searches for members of this enumerated type. All normal rules of ObjectPascal scope apply, which means that e.g. classes have their separate namespace. When searching for Foo from the unit level, we do not "look into" class namespaces. Returns nil if not found. Note that it never compares NameParts with Self.Name. You may want to check this yourself if you want. Note that for TPasItem descendants, it always returns also some TPasItem descendant (so if you use this method with some TPasItem instance, you can safely cast result of this method to TPasItem). Implementation in this class always returns nil. Override as necessary. | |
| Public | function FindItemMaybeInAncestors(const NameParts: TNameParts): TBaseItem; virtual; |
|
This is just like FindItem, but in case of classes or such it should also search within ancestors. In this class, the default implementation just calls FindItem. | |
| Public | function FindName(const NameParts: TNameParts): TBaseItem; virtual; |
|
Do all you can to find link specified by NameParts. While searching this tries to mimic ObjectPascal identifier scope as much as it can. It seaches within this item, but also within class enclosing this item, within ancestors of this class, within unit enclosing this item, then within units used by unit of this item. | |
| Public | function RawDescriptionInfo: PRawDescriptionInfo; |
|
Full info about RawDescription of this item, including it's filename and position. This is intended to be initialized by parser. This returns PRawDescriptionInfo instead of just TRawDescriptionInfo to allow natural setting of properties of this record (otherwise Item.RawDescriptionInfo.StreamName := 'foo';
would not work as expected) . | |
| Public | function QualifiedName: String; virtual; |
|
Returns the qualified name of the item. This is intended to return a concise and not ambigous name. E.g. in case of TPasItem it is overridden to return Name qualified by class name and unit name. In this class this simply returns Name. | |
| Public | function BasePath: string; virtual; |
|
The full (absolute) path used to resolve filenames in this item's descriptions. Must always end with PathDelim. In this class, this simply returns GetCurrentDir (with PathDelim added if needed). | |
| Public | function Signature: string; virtual; |
|
This item has no description. | |
| Protected | procedure Serialize(const ADestination: TStream); override; |
|
This item has no description. Showing description inherited from TBaseItem.Serialize. Serialization of TPasItem need to store in stream only data that is generated by parser. That's because current approach treats "loading from cache" as equivalent to parsing a unit and stores to cache right after parsing a unit. So what is generated by parser must be written to cache. That said,
| |
| Protected | procedure Deserialize(const ASource: TStream); override; |
|
This item has no description. | |
| Protected | function FindNameWithinUnit(const NameParts: TNameParts): TBaseItem; virtual; |
|
This does the same thing as FindName but it doesn't scan other units. If this item is a unit, it searches only inside this unit, else it searches only inside MyUnit unit. Actually FindName uses this function. | |
| Public | constructor Create; override; |
|
This item has no description. | |
| Public | destructor Destroy; override; |
|
This item has no description. | |
| Public | function FindName(const NameParts: TNameParts): TBaseItem; override; |
|
This item has no description. Showing description inherited from TBaseItem.FindName. Do all you can to find link specified by NameParts. While searching this tries to mimic ObjectPascal identifier scope as much as it can. It seaches within this item, but also within class enclosing this item, within ancestors of this class, within unit enclosing this item, then within units used by unit of this item. | |
| Public | procedure RegisterTags(TagManager: TTagManager); override; |
|
This item has no description. Showing description inherited from TBaseItem.RegisterTags. It registers TTags that init Authors, Created, LastMod and remove relevant tags from description. You can override it to add more handlers. | |
| Public | function HasDescription: Boolean; |
|
Returns true if there is a DetailedDescription or AbstractDescription available. | |
| Public | function HasRawDescription: Boolean; |
|
Is RawDescription not empty. | |
| Public | function QualifiedName: String; override; |
|
This item has no description. Showing description inherited from TBaseItem.QualifiedName. Returns the qualified name of the item. This is intended to return a concise and not ambigous name. E.g. in case of TPasItem it is overridden to return Name qualified by class name and unit name. In this class this simply returns Name. | |
| Public | function UnitRelativeQualifiedName: string; virtual; |
|
This item has no description. | |
| Public | procedure Sort(const SortSettings: TSortSettings); virtual; |
|
Sort items inside (recursively, so it sorts within the items too). E.g. in case of TPasUnit, we can sort variables, constants, CIOs in the unit, and then we call Only the thigns listed in SortSettings will be sorted, the rest will be left unsorted. Note that some things are never sorted, e.g. members of TPasEnum are never sorted (since their order affects the code logic, so we should not misrepresent it in the output doc). | |
| Public | procedure SetAttributes(var Value: TStringPairVector); |
|
This item has no description. | |
| Public | function InheritedItem: TPasItem; virtual; |
|
Get the closest item that this item inherits from. | |
| Public | function GetInheritedItemDescriptions: TStringPairVector; virtual; |
|
Generate a list of descriptions defined on this item in base classes. This stops at the first class ancestor to have a description defined for an ancestor of this item. Along the way it will also collect descriptions of this item from any implemented interfaces. If there is no description in any ancestor, it will return an empty vector. | |
| Public | function BasePath: string; override; |
|
This item has no description. Showing description inherited from TBaseItem.BasePath. The full (absolute) path used to resolve filenames in this item's descriptions. Must always end with PathDelim. In this class, this simply returns GetCurrentDir (with PathDelim added if needed). | |
| Public | function HasOptionalInfo: boolean; virtual; |
|
Is optional information (that may be empty for after parsing unit and expanding tags) specified. Currently this checks Params and Raises and TPasRoutine.Returns. | |
| Public | function IsOverride: Boolean; virtual; |
|
Whether this item overrides an item in an ancestor. | |
| Protected | procedure Serialize(const ADestination: TStream); override; |
|
This item has no description. Showing description inherited from TBaseItem.Serialize. Serialization of TPasItem need to store in stream only data that is generated by parser. That's because current approach treats "loading from cache" as equivalent to parsing a unit and stores to cache right after parsing a unit. So what is generated by parser must be written to cache. That said,
| |
| Protected | procedure Deserialize(const ASource: TStream); override; |
|
This item has no description. | |
| Protected | procedure StoreValueTag(ThisTag: TTag; var ThisTagData: TObject; EnclosingTag: TTag; var EnclosingTagData: TObject; const TagParameter: string; var ReplaceStr: string); |
|
This item has no description. | |
| Public | procedure RegisterTags(TagManager: TTagManager); override; |
|
This item has no description. Showing description inherited from TBaseItem.RegisterTags. It registers TTags that init Authors, Created, LastMod and remove relevant tags from description. You can override it to add more handlers. | |
| Public | function FindItem(const NameParts: TNameParts): TBaseItem; override; |
|
Searches for a member of this enumerated type. | |
| Public | destructor Destroy; override; |
|
This item has no description. | |
| Public | constructor Create; override; |
|
This item has no description. | |
Properties
| Public | property WasDeserialized: boolean read FWasDeserialized; |
|
This item has no description. | |
| Public | property DetailedDescription: string
read FDetailedDescription write FDetailedDescription; |
|
Detailed description of this item. In case of TPasItem, this is something more elaborate than TPasItem.AbstractDescription. This is already in the form suitable for final output, ready to be put inside final documentation. | |
| Public | property RawDescription: string
read GetRawDescription write WriteRawDescription; |
|
This stores unexpanded version (as specified in user's comment in source code of parsed units) of description of this item. Actually, this is just a shortcut to | |
| Public | property FullLink: string read FFullLink write FFullLink; |
|
a full link that should be enough to link this item from anywhere else | |
| Public | property LastMod: string read FLastMod write FLastMod; |
|
Contains '' or string with date of last modification. This string is already in the form suitable for final output format (i.e. already processed by TDocGenerator.ConvertString). | |
| Public | property Name: string read FName write FName; |
|
name of the item | |
| Public | property Authors: TStringVector read FAuthors write SetAuthors; |
|
list of strings, each representing one author of this item | |
| Public | property Created: string read FCreated; |
|
Contains '' or string with date of creation. This string is already in the form suitable for final output format (i.e. already processed by TDocGenerator.ConvertString). | |
| Public | property AutoLinkHereAllowed: boolean
read FAutoLinkHereAllowed write FAutoLinkHereAllowed default true; |
|
Is auto-link mechanism allowed to create link to this item ? This may be set to | |
| Public | property AbstractDescription: string
read FAbstractDescription write FAbstractDescription; |
|
Abstract description of this item. This is intended to be short (e.g. one sentence) description of this object. This will be inited from @abstract tag in RawDescription, or cutted out from first sentence in RawDescription if --auto-abstract was used. Note that this is already in the form suitable for final output, with tags expanded, chars converted etc. | |
| Public | property AbstractDescriptionWasAutomatic: boolean
read FAbstractDescriptionWasAutomatic
write FAbstractDescriptionWasAutomatic; |
|
TDocGenerator.ExpandDescriptions sets this property to true if AutoAbstract was used and AbstractDescription of this item was automatically deduced from the 1st sentence of RawDescription. Otherwise (if @abstract was specified explicitly, or there was no @abstract and AutoAbstract was false) this is set to false. This is a useful hint for generators: it tells them that when they are printing both AbstractDescription and DetailedDescription of the item in one place (e.g. TTexDocGenerator.WriteItemLongDescription and TGenericHTMLDocGenerator.WriteItemLongDescription both do this) then they should not put any additional space between AbstractDescription and DetailedDescription. This way when user will specify description like { First sentence. Second sentence. } procedure Foo;
and --auto-abstract was on, then "First sentence." is the AbstractDescription, " Second sentence." is DetailedDescription, AbstractDescriptionWasAutomatic is true and and TGenericHTMLDocGenerator.WriteItemLongDescription can print them as "First sentence. Second sentence." Without this property, TGenericHTMLDocGenerator.WriteItemLongDescription would not be able to say that this abstract was deduced automatically and would print additional paragraph break that was not present in desscription, i.e. "First sentence.<p> Second sentence." | |
| Public | property MyUnit: TPasUnit read FMyUnit write FMyUnit; |
|
Unit of this item. | |
| Public | property MyObject: TPasCio read FMyObject write FMyObject; |
|
If this item is part of a class (or record, object., interface...), the corresponding class is stored here. | |
| Public | property MyEnum: TPasEnum read FMyEnum write FMyEnum; |
|
If this item is a member of an enumerated type, then the enclosing enumerated type is stored here. | |
| Public | property Visibility: TVisibility read FVisibility write FVisibility; |
|
This item has no description. | |
| Public | property HintDirectives: THintDirectives read FHintDirectives write FHintDirectives; |
|
Hint directives specify is this item deprecated, platform-specific, library-specific, experimental, or unimplemented. | |
| Public | property DeprecatedNote: string
read FDeprecatedNote write FDeprecatedNote; |
|
Deprecation note, specified as a string after "deprecated" directive. Empty if none, always empty if HintDirectives does not contain hdDeprecated. | |
| Public | property FullDeclaration: string read FFullDeclaration write FFullDeclaration; |
|
Full declaration of the item, similar to how it appears in the Pascal source code. Note that that this is not used for some descendants. Right now it's used only with
The intention is that in the future all TPasItem descendants will always have appropriate FullDeclaration set. It all requires adjusting appropriate places in PasDoc_Parser to generate appropriate FullDeclaration. | |
| Public | property SeeAlso: TStringPairVector read FSeeAlso; |
|
Items here are collected from @seealso tags. Name of each item is the 1st part of @seealso parameter. Value is the 2nd part of @seealso parameter. | |
| Public | property Attributes: TStringPairVector read FAttributes; |
|
List of attributes defined for this item | |
| Public | property Params: TStringPairVector read FParams; |
|
Parameters of method or property. Name of each item is the name of parameter (without any surrounding whitespace), Value of each item is users description for this item (in already-expanded form). This is already in the form processed by TTagManager.Execute, i.e. with links resolved, html characters escaped etc. So don't convert them (e.g. before writing to the final docs) once again (by some ExpandDescription or ConvertString or anything like that). | |
| Public | property Raises: TStringPairVector read FRaises; |
|
Exceptions raised by the method, or by property getter/setter. Name of each item is the name of exception class (without any surrounding whitespace), Value of each item is users description for this item (in already-expanded form). This is already in the form processed by TTagManager.Execute, i.e. with links resolved, html characters escaped etc. So don't convert them (e.g. before writing to the final docs) once again (by some ExpandDescription or ConvertString or anything like that). | |
| Public | property SourceAbsoluteFileName: string
read FSourceAbsoluteFileName write FSourceAbsoluteFileName; |
|
Source (absolute) file name where this item is declared. Set by the parser when parsing the item's declaration. | |
| Public | property SourceLine: Integer read FSourceLine write FSourceLine; |
|
Source line number (1-based) where this item is declared. Set by the parser when parsing the item's declaration. | |
| Public | property Members: TPasItems read FMembers; |
|
This item has no description. | |
Generated by PasDoc 0.17.0.snapshot.