PasDoc's autodocOverview Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers Unit dependency graph Classes hierarchy graph
|
Class TPasUnit
Unit
PasDoc_Items
Declaration
type TPasUnit = class(TPasItem)
Description
extends TPasItem to store anything about a unit, its constants, types etc.; also provides methods for parsing a complete unit.
Note: Remember to always set CacheDateTime after deserializing this unit.
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
|
FSourceFilename: string; |
|
|
FOutputFileName: string; |
|
|
FCacheDateTime: TDateTime; |
|
|
FSourceFileDateTime: TDateTime; |
|
|
FIsUnit: boolean; |
|
|
FIsProgram: boolean; |
|
Methods
|
procedure Serialize(const ADestination: TStream); override; |
|
|
procedure Deserialize(const ASource: TStream); override; |
|
|
constructor Create; override; |
|
|
destructor Destroy; override; |
|
|
procedure AddCIO(const i: TPasCio); |
|
|
procedure AddConstant(const i: TPasItem); |
|
|
procedure AddVariable(const i: TPasItem); |
|
|
function FindInsideSomeClass(const AClassName, ItemInsideClass: string): TPasItem; |
|
|
function FindInsideSomeEnum(const EnumName, EnumMember: string): TPasItem; |
|
|
function FindItem(const ItemName: string): TBaseItem; override; |
|
|
function FileNewerThanCache(const FileName: string): boolean; |
Returns if unit WasDeserialized, and file FileName exists, and file FileName is newer than CacheDateTime.
So if FileName contains some info generated from information of this unit, then we can somehow assume that FileName still contains valid information and we don't have to write it once again.
Sure, we're not really 100% sure that FileName still contains valid information, but that's how current approach to cache works.
|
|
function BasePath: string; override; |
|
Properties
|
property CIOs: TPasItems read FCIOs; |
list of classes, interfaces, objects, and records defined in this unit
|
|
property UsesUnits: TStringVector read FUsesUnits; |
The names of all units mentioned in a uses clause in the interface section of this unit.
This is never nil.
After TDocGenerator.BuildLinks, for every i: UsesUnits.Objects[i] will point to TPasUnit object with Name = UsesUnits[i] (or nil, if pasdoc's didn't parse such unit). In other words, you will be able to use UsesUnits.Objects[i] to obtain given unit's instance, as parsed by pasdoc.
|
|
property CacheDateTime: TDateTime
read FCacheDateTime write FCacheDateTime; |
If WasDeserialized then this specifies the datetime of a cache data of this unit, i.e. when cache data was generated. If cache was obtained from a file then this is just the cache file modification date/time.
If not WasDeserialized then this property has undefined value – don't use it.
|
|
property IsUnit: boolean read FIsUnit write FIsUnit; |
If False , then this is a program or library file, not a regular unit (though it's treated by pasdoc almost like a unit, so we use TPasUnit class for this).
|
Generated by PasDoc 0.15.0.
|