NaturalDocs::ClassHierarchy::File

An object that stores information about what hierarchy information is present in a file.  It does not store its FileName; it assumes that it will be stored in a hashref where the key is the FileName.

Summary
NaturalDocs::ClassHierarchy::FileAn object that stores information about what hierarchy information is present in a file.
ImplementationSince there’s only one member in the class, and it’s a hashref, the class is simply the hashref itself blessed as a class.
Modification Functions
NewCreates and returns a new class.
AddClassAdds a rew class SymbolString to the file.
DeleteClassDeletes a class SymbolString from the file.
AddParentReferenceAdds a parent ReferenceString to a class SymbolString.
DeleteParentReferenceDeletes a parent ReferenceString from a class SymbolString.
Information Functions
ClassesReturns an array of the class SymbolStrings that are defined by this file, or an empty array if none.
HasClassReturns whether the file defines the passed class SymbolString.
ParentReferencesOfReturns an array of the parent ReferenceStrings that are defined by the class, or an empty array if none.
HasParentReferenceReturns whether the file defines the passed class SymbolString and parent ReferenceString.

Implementation

Since there’s only one member in the class, and it’s a hashref, the class is simply the hashref itself blessed as a class.  The keys are the class SymbolStrings that are defined in the file, and the values are existence hashrefs of each class’ parent ReferenceStrings, or undef if none.

Modification Functions

New

sub New

Creates and returns a new class.

AddClass

sub AddClass #(class)

Adds a rew class SymbolString to the file.

DeleteClass

sub DeleteClass #(class)

Deletes a class SymbolString from the file.

AddParentReference

sub AddParentReference #(class,
parentReference)

Adds a parent ReferenceString to a class SymbolString.

DeleteParentReference

sub DeleteParentReference #(class,
parent)

Deletes a parent ReferenceString from a class SymbolString.

Information Functions

Classes

sub Classes

Returns an array of the class SymbolStrings that are defined by this file, or an empty array if none.

HasClass

sub HasClass #(class)

Returns whether the file defines the passed class SymbolString.

ParentReferencesOf

sub ParentReferencesOf #(class)

Returns an array of the parent ReferenceStrings that are defined by the class, or an empty array if none.

HasParentReference

sub HasParentReference #(class,
parent)

Returns whether the file defines the passed class SymbolString and parent ReferenceString.

sub New
Creates and returns a new class.
sub AddClass #(class)
Adds a rew class SymbolString to the file.
A scalar which encodes a normalized array of identifier strings representing a full or partially-resolved symbol.
sub DeleteClass #(class)
Deletes a class SymbolString from the file.
sub AddParentReference #(class,
parentReference)
Adds a parent ReferenceString to a class SymbolString.
All the information about a reference that makes it unique encoded into a string.
sub DeleteParentReference #(class,
parent)
Deletes a parent ReferenceString from a class SymbolString.
sub Classes
Returns an array of the class SymbolStrings that are defined by this file, or an empty array if none.
sub HasClass #(class)
Returns whether the file defines the passed class SymbolString.
sub ParentReferencesOf #(class)
Returns an array of the parent ReferenceStrings that are defined by the class, or an empty array if none.
sub HasParentReference #(class,
parent)
Returns whether the file defines the passed class SymbolString and parent ReferenceString.
A string representing the absolute, platform-dependent path to a file.
Close