NaturalDocs:: SymbolTable:: File

A class representing a file, keeping track of what symbols and references are defined in it. 

Summary
A class representing a file, keeping track of what symbols and references are defined in it.
The class is implemented as a blessed arrayref.
Creates and returns a new object.
Adds a symbol definition.
Removes a symbol definition.
Adds a reference definition.
Removes a reference definition.
Returns whether the file has any symbol or reference definitions at all.
Returns an array of all the symbols defined in this file.
Returns an array of all the references defined in this file.
Returns whether the file defines the passed symbol or not.
Returns whether the file defines the passed reference or not.

Implementation

Members

The class is implemented as a blessed arrayref.  The following constants are its members. 

SYMBOLSAn existence hashref of all the symbols it defines. 
REFERENCESAn existence hashref of all the references in the file. 

Modification Functions

New

sub New

Creates and returns a new object. 

AddSymbol

sub AddSymbol #(symbolString)

Adds a symbol definition. 

Parameters

symbolStringThe symbol string being added. 

DeleteSymbol

sub DeleteSymbol #(symbolString)

Removes a symbol definition. 

Parameters

symbolStringThe symbol to delete. 

AddReference

sub AddReference #(referenceString)

Adds a reference definition. 

Parameters

referenceStringThe reference string being added. 

DeleteReference

sub DeleteReference #(referenceString)

Removes a reference definition. 

Parameters

referenceStringThe reference to delete. 

Information Functions

HasAnything

sub HasAnything

Returns whether the file has any symbol or reference definitions at all. 

Symbols

sub Symbols

Returns an array of all the symbols defined in this file.  If none, returns an empty array. 

References

sub References

Returns an array of all the references defined in this file.  If none, returns an empty array. 

DefinesSymbol

sub DefinesSymbol #(symbolString)

Returns whether the file defines the passed symbol or not. 

DefinesReference

sub DefinesReference #(referenceString)

Returns whether the file defines the passed reference or not.