An object that stores information about a class in the hierarchy. It does not store its SymbolString; it assumes that it will be stored in a hashref where the key is the SymbolString.
NaturalDocs:: | An object that stores information about a class in the hierarchy. |
Members | The class is implemented as a blessed arrayref. |
Modification Functions | |
New | Creates and returns a new class. |
AddDefinition | Adds a rew definition of this class and returns if that was the first definition. |
DeleteDefinition | Removes the definition of this class and returns if there are no more definitions. |
AddParentReference | Adds a parent reference to the class and return whether it resulted in a new parent class. |
DeleteParentReference | Deletes a parent reference from the class and return whether it resulted in a loss of a parent class. |
AddChild | Adds a child SymbolString to the class. |
DeleteChild | Deletes a child SymbolString from the class. |
Information Functions | |
Definitions | Returns an array of the FileNames that define this class, or an empty array if none. |
IsDefinedIn | Returns whether the class is defined in the passed FileName. |
IsDefined | Returns whether the class is defined in any files. |
ParentReferences | Returns an array of the parent ReferenceStrings, or an empty array if none. |
HasParentReference | Returns whether the class has the passed parent ReferenceString. |
HasParentReferences | Returns whether the class has any parent ReferenceStrings. |
Parents | Returns an array of the parent SymbolStrings, or an empty array if none. |
HasParents | Returns whether the class has any parent SymbolStrings defined. |
Children | Returns an array of the child SymbolStrings, or an empty array if none. |
HasChildren | Returns whether any child SymbolStrings are defined. |
ParentReferenceDefinitions | Returns an array of the FileNames which define the passed parent ReferenceString, or an empty array if none. |
The class is implemented as a blessed arrayref. The keys are the constants below.
DEFINITIONS | An existence hashref of all the FileNames which define this class. Undef if none. |
PARENTS | An existence hashref of the SymbolStrings of all the parents this class has. |
CHILDREN | An existence hashref of the SymbolStrings of all the children this class has. |
PARENT_REFERENCES | A hashref of the parent ReferenceStrings this class has. The keys are the ReferenceStrings, and the values are existence hashrefs of all the FileNames that define them. Undef if none. |
sub AddDefinition #( file )
Adds a rew definition of this class and returns if that was the first definition.
file | The FileName the definition appears in. |
Whether this was the first definition of this class.
sub DeleteDefinition #( file )
Removes the definition of this class and returns if there are no more definitions. Note that if there are no more definitions, you may still want to keep the object around if HasChildren() returns true.
file | The FileName the definition appears in. |
Whether this deleted the last definition of this class.
sub AddParentReference #( reference, file, referenceTranslations )
Adds a parent reference to the class and return whether it resulted in a new parent class.
reference | The ReferenceString used to determine the parent. |
file | The FileName the parent reference is in. |
referenceTranslations | A hashref of what each reference currently resolves to. The keys are the ReferenceStrings and the values are class SymbolStrings. It should include an entry for the reference parameter above. |
If the reference adds a new parent, it will return that parent’s SymbolString. Otherwise it will return undef.
sub DeleteParentReference #( reference, file, referenceTranslations )
Deletes a parent reference from the class and return whether it resulted in a loss of a parent class.
reference | The ReferenceString used to determine the parent. |
file | The FileName the parent declaration is in. |
referenceTranslations | A hashref of what each reference currently resolves to. The keys are the ReferenceStrings and the values are class SymbolStrings. It should include an entry for the reference parameter above. |
If this causes a parent class to be lost, it will return that parent’s SymbolString. Otherwise it will return undef.
sub AddChild #( child )
Adds a child SymbolString to the class. Unlike AddParentReference(), this does not keep track of anything other than whether it has it or not.
child | The SymbolString to add. |
sub DeleteChild #( child )
Deletes a child SymbolString from the class. Unlike DeleteParentReference(), this does not keep track of anything other than whether it has it or not.
child | The SymbolString to delete. |
sub Definitions
Returns an array of the FileNames that define this class, or an empty array if none.
sub IsDefinedIn #( file )
Returns whether the class is defined in the passed FileName.
sub ParentReferences
Returns an array of the parent ReferenceStrings, or an empty array if none.
sub HasParentReference #( reference )
Returns whether the class has the passed parent ReferenceString.
sub HasParentReferences
Returns whether the class has any parent ReferenceStrings.
sub Parents
Returns an array of the parent SymbolStrings, or an empty array if none.
sub HasParents
Returns whether the class has any parent SymbolStrings defined.
sub Children
Returns an array of the child SymbolStrings, or an empty array if none.
sub HasChildren
Returns whether any child SymbolStrings are defined.
sub ParentReferenceDefinitions #( reference )
Returns an array of the FileNames which define the passed parent ReferenceString, or an empty array if none.
Creates and returns a new class.
sub New
Adds a rew definition of this class and returns if that was the first definition.
sub AddDefinition #( file )
Removes the definition of this class and returns if there are no more definitions.
sub DeleteDefinition #( file )
Adds a parent reference to the class and return whether it resulted in a new parent class.
sub AddParentReference #( reference, file, referenceTranslations )
Deletes a parent reference from the class and return whether it resulted in a loss of a parent class.
sub DeleteParentReference #( reference, file, referenceTranslations )
Adds a child SymbolString to the class.
sub AddChild #( child )
Deletes a child SymbolString from the class.
sub DeleteChild #( child )
Returns an array of the FileNames that define this class, or an empty array if none.
sub Definitions
Returns whether the class is defined in the passed FileName.
sub IsDefinedIn #( file )
Returns whether the class is defined in any files.
sub IsDefined
Returns an array of the parent ReferenceStrings, or an empty array if none.
sub ParentReferences
Returns whether the class has the passed parent ReferenceString.
sub HasParentReference #( reference )
Returns whether the class has any parent ReferenceStrings.
sub HasParentReferences
Returns an array of the parent SymbolStrings, or an empty array if none.
sub Parents
Returns whether the class has any parent SymbolStrings defined.
sub HasParents
Returns an array of the child SymbolStrings, or an empty array if none.
sub Children
Returns whether any child SymbolStrings are defined.
sub HasChildren
Returns an array of the FileNames which define the passed parent ReferenceString, or an empty array if none.
sub ParentReferenceDefinitions #( reference )