NaturalDocs::SourceDB::Extension

NaturalDocs::SourceDB::Extension

A base package for all SourceDB extensions.

Summary
NaturalDocs::SourceDB::ExtensionA base package for all SourceDB extensions.
Interface FunctionsThese functions must be overridden by the derived class.
RegisterOverride this function to register the package with NaturalDocs::SourceDB->RegisterExtension().
LoadCalled by NaturalDocs::SourceDB->Load() to load the extension’s data.
SaveCalled by NaturalDocs::SourceDB->Save() to save the extension’s data.
OnDeletedDefinitionCalled for each definition deleted by NaturalDocs::SourceDB.
OnChangedDefinitionCalled for each definition changed by NaturalDocs::SourceDB.

Interface Functions

These functions must be overridden by the derived class.

Register

sub Register

Override this function to register the package with NaturalDocs::SourceDB->RegisterExtension().

Load

sub Load # => bool

Called by NaturalDocs::SourceDB->Load() to load the extension’s data.  Returns whether it was successful.

This function might not be called.  If there’s a situation that would cause all the source files to be reparsed anyway, NaturalDocs::SourceDB may skip calling Load() for the remaining extensions.  You should not depend on this function for any critical initialization that needs to happen every time regardless.

Save

sub Save

Called by NaturalDocs::SourceDB->Save() to save the extension’s data.

OnDeletedDefinition

sub OnDeletedDefinition #(string itemString,
FileName file,
bool wasLastDefinition)

Called for each definition deleted by NaturalDocs::SourceDB.  This is called after the definition has been deleted from the database, so don’t expect to be able to read it.

OnChangedDefinition

sub OnChangedDefinition #(string itemString,
FileName file)

Called for each definition changed by NaturalDocs::SourceDB.  This is called after the definition has been changed, so don’t expect to be able to read the original value.

A NaturalDocs::SourceDB-based package that manages all the image references appearing in source files.
SourceDB is an experimental package meant to unify the tracking of various elements in the source code.
sub Register
Override this function to register the package with NaturalDocs::SourceDB->RegisterExtension().
sub RegisterExtension #(package extension,
bool usesDefinitionObjects) => ExtensionID
Registers a NaturalDocs::SourceDB::Extension-derived package and returns a unique ExtensionID for it.
sub Load # => bool
Called by NaturalDocs::SourceDB->Load() to load the extension’s data.
sub Load
Loads the data of the source database and all the extensions.
sub Save
Called by NaturalDocs::SourceDB->Save() to save the extension’s data.
sub Save
Saves the data of the source database and all its extensions.
sub OnDeletedDefinition #(string itemString,
FileName file,
bool wasLastDefinition)
Called for each definition deleted by NaturalDocs::SourceDB.
sub OnChangedDefinition #(string itemString,
FileName file)
Called for each definition changed by NaturalDocs::SourceDB.
Close