A package to manage ReferenceString handling throughout the program.
The type of a reference.
Used to influence the method of resolving references in NaturalDocs::SymbolTable.
|RESOLVE_RELATIVE||The reference text is truly relative, rather than Natural Docs’ semi-relative.|
|RESOLVE_ABSOLUTE||The reference text is always absolute. No local or relative references.|
|RESOLVE_NOPLURAL||The reference text may not be interpreted as a plural, and thus match singular forms as well.|
|RESOLVE_NOUSING||The reference text may not include “using” statements when being resolved.|
If neither RESOLVE_RELATIVE or RESOLVE_ABSOLUTE is specified, Natural Docs’ semi-relative kicks in instead, which is where links are interpreted as local, then global, then relative. RESOLVE_RELATIVE states that links are local, then relative, then global.
|sub MakeFrom #(||ReferenceType ||type,|
Encodes the passed information as a ReferenceString. The format of the string should be treated as opaque. However, the characteristic you can rely on is that the same string will always be made from the same parameters, and thus it’s suitable for comparison and use as hash keys.
|symbol||The SymbolString of the reference.|
|language||The name of the language that defines the file this reference appears in.|
|scope||The scope SymbolString the reference appears in, or undef if none.|
|using||An arrayref of scope SymbolStrings that are also available for checking due to the equivalent a “using” statement, or undef if none.|
|resolvingFlags||The Resolving Flags to use with this reference. They are ignored if the type is REFERENCE_TEXT.|
The encoded ReferenceString.
|sub ToBinaryFile #(||FileHandle ||fileHandle,|
Writes a ReferenceString to the passed filehandle. Can also encode an undef.
|fileHandle||The filehandle to write to.|
|referenceString||The ReferenceString to write, or undef.|
|binaryFormatFlags||Any Binary Format Flags you want to use to influence encoding.|
[SymbolString: Symbol or undef for an undef reference]
[SymbolString: Scope or undef for none]
[SymbolString: Using or undef for none]
[SymbolString: Using or undef for no more]
[UInt8: Type unless BINARYREF_NOTYPE is set]
[UInt8: Resolving Flags unless BINARYREF_NORESOLVINGFLAGS is set]
|sub FromBinaryFile #(||FileHandle ||fileHandle,|
Reads a ReferenceString or undef from the passed filehandle.
The ReferenceString or undef.
See ToBinaryFile() for format and dependencies.
|sub InformationOf #(||ReferenceString ||referenceString||)|
Returns the information encoded in a ReferenceString.
The array ( type, symbol, language, scope, using, resolvingFlags ).
|language||The name of the language that defined the file the reference was defined in.|
|scope||The scope SymbolString, or undef if none.|
|using||An arrayref of scope SymbolStrings that the reference also has access to via “using” statements, or undef if none.|
|resolvingFlags||The Resolving Flags of the reference.|
|sub TypeOf #(||ReferenceString ||referenceString||)|
Returns the ReferenceType encoded in the reference string. This is faster than InformationOf() if this is the only information you need.