NaturalDocs::Languages::Prototype

A data class for storing parsed prototypes.

Summary
NaturalDocs::Languages::PrototypeA data class for storing parsed prototypes.
Functions
NewCreates and returns a new prototype object.
BeforeParametersReturns the part of the prototype before the parameter list.
SetBeforeParametersReplaces the part of the prototype before the parameter list.
AfterParametersReturns the part of the prototype after the parameter list, if any.
SetAfterParametersReplaces the part of the prototype after the parameter list.
ParametersReturns the parameter list as an arrayref of NaturalDocs::Languages::Prototype::Parameters, or undef if none.
AddParameterAdds a NaturalDocs::Languages::Prototype::Parameter to the list.
OnlyBeforeParametersReturns whether BeforeParameters() is the only thing set.

Functions

New

sub New #(beforeParameters,
afterParameters)

Creates and returns a new prototype object.

Parameters

beforeParametersThe part of the prototype before the parameter list.
afterParametersThe part of the prototype after the parameter list.

You cannot set the parameters from here.  Use AddParameter().

BeforeParameters

Returns the part of the prototype before the parameter list.  If there is no parameter list, this will be the only thing that returns content.

SetBeforeParameters

Replaces the part of the prototype before the parameter list.

AfterParameters

Returns the part of the prototype after the parameter list, if any.

SetAfterParameters

Replaces the part of the prototype after the parameter list.

Parameters

Returns the parameter list as an arrayref of NaturalDocs::Languages::Prototype::Parameters, or undef if none.

AddParameter

sub AddParameter #(parameter)

Adds a NaturalDocs::Languages::Prototype::Parameter to the list.

OnlyBeforeParameters

sub OnlyBeforeParameters

Returns whether BeforeParameters() is the only thing set.

sub New #(beforeParameters,
afterParameters)
Creates and returns a new prototype object.
Returns the parameter list as an arrayref of NaturalDocs::Languages::Prototype::Parameters, or undef if none.
sub AddParameter #(parameter)
Adds a NaturalDocs::Languages::Prototype::Parameter to the list.
A data class for storing parsed prototype parameters.
sub OnlyBeforeParameters
Returns whether BeforeParameters() is the only thing set.
Returns the part of the prototype before the parameter list.
Close