NaturalDocs::SourceDB::Extension |
A base package for all SourceDB extensions.
NaturalDocs:: | A base package for all SourceDB extensions. |
Interface Functions | These functions must be overridden by the derived class. |
Register | Override this function to register the package with NaturalDocs::SourceDB->RegisterExtension(). |
Load | Called by NaturalDocs::SourceDB->Load() to load the extension’s data. |
Save | Called by NaturalDocs::SourceDB->Save() to save the extension’s data. |
OnDeletedDefinition | Called for each definition deleted by NaturalDocs::SourceDB. |
OnChangedDefinition | Called for each definition changed by NaturalDocs::SourceDB. |
sub Register
Override this function to register the package with NaturalDocs::SourceDB->RegisterExtension().
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.
sub Save
Called by NaturalDocs::SourceDB->Save() to save the extension’s data.
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.
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.
Override this function to register the package with NaturalDocs::SourceDB->RegisterExtension().
sub Register
Registers a NaturalDocs::SourceDB::Extension-derived package and returns a unique ExtensionID for it.
sub RegisterExtension #( package extension, bool usesDefinitionObjects ) => ExtensionID
Called by NaturalDocs::SourceDB->Load() to load the extension’s data.
sub Load # => bool
Loads the data of the source database and all the extensions.
sub Load
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 Save
Called for each definition deleted by NaturalDocs::SourceDB.
sub OnDeletedDefinition #( string itemString, FileName file, bool wasLastDefinition )
Called for each definition changed by NaturalDocs::SourceDB.
sub OnChangedDefinition #( string itemString, FileName file )