NaturalDocs:: SymbolTable:: SymbolDefinition

A class representing a symbol definition.  This does not store the definition symbol, class, or file.

Summary
A class representing a symbol definition.
The class is implemented as a blessed arrayref.
Creates and returns a new object.
Changes the type.
Changes the prototype.
Changes the summary.
Returns the definition’s type.
Returns the definition’s prototype, or undef if it doesn’t have one.
Returns the definition’s summary, or undef if it doesn’t have one.

Implementation

Members

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

TYPEThe symbol type.  Will be one of the <Topic Types>.
PROTOTYPEThe symbol’s prototype, if applicable.  Will be undef otherwise.
SUMMARYThe symbol’s summary, if applicable.  Will be undef otherwise.

Modification Functions

New

sub New #(type,
prototype,
summary)

Creates and returns a new object.

Parameters

typeThe symbol type.  Should be one of the <Topic Types>.
prototypeThe symbol prototype, if applicable.  Undef otherwise.
summaryThe symbol’s summary, if applicable.  Undef otherwise.

SetType

sub SetType #(type)

Changes the type.

SetPrototype

sub SetPrototype #(prototype)

Changes the prototype.

SetSummary

sub SetSummary #(summary)

Changes the summary.

Information Functions

Type

sub Type

Returns the definition’s type.  Will be one of the <Topic Types>.

Prototype

sub Prototype

Returns the definition’s prototype, or undef if it doesn’t have one.

Summary

sub Summary

Returns the definition’s summary, or undef if it doesn’t have one.

sub New #(type,
prototype,
summary)
Creates and returns a new object.
sub SetType #(type)
Changes the type.
sub SetPrototype #(prototype)
Changes the prototype.
sub SetSummary #(summary)
Changes the summary.
sub Type
Returns the definition’s type.
sub Prototype
Returns the definition’s prototype, or undef if it doesn’t have one.
sub Summary
Returns the definition’s summary, or undef if it doesn’t have one.