From 61bfe2d70cae6be8c4086a210a5451135ccca9ea Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 2 Aug 2008 08:21:29 +0000 Subject: added doc tool --- .../tool/Modules/NaturalDocs/SourceDB/Extension.pm | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 docs/tool/Modules/NaturalDocs/SourceDB/Extension.pm (limited to 'docs/tool/Modules/NaturalDocs/SourceDB/Extension.pm') diff --git a/docs/tool/Modules/NaturalDocs/SourceDB/Extension.pm b/docs/tool/Modules/NaturalDocs/SourceDB/Extension.pm new file mode 100644 index 00000000..c247ea02 --- /dev/null +++ b/docs/tool/Modules/NaturalDocs/SourceDB/Extension.pm @@ -0,0 +1,84 @@ +############################################################################### +# +# Package: NaturalDocs::SourceDB::Extension +# +############################################################################### +# +# A base package for all extensions. +# +############################################################################### + +# This file is part of Natural Docs, which is Copyright (C) 2003-2008 Greg Valure +# Natural Docs is licensed under the GPL + +use strict; +use integer; + + +package NaturalDocs::SourceDB::Extension; + + +############################################################################### +# Group: Interface Functions +# These functions must be overridden by the derived class. + + +# +# Function: Register +# +# Override this function to register the package with RegisterExtension()>. +# +sub Register + { + die "Called SourceDB::Extension->Register(). This function should be overridden by every extension."; + }; + + +# +# Function: Load +# +# Called by 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, +# 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 Load # => bool + { + return 1; + }; + + +# +# Function: Save +# +# Called by Save()> to save the extension's data. +# +sub Save + { + }; + + +# +# Function: OnDeletedDefinition +# +# Called for each definition deleted by . This is called *after* the definition has been deleted from +# the database, so don't expect to be able to read it. +# +sub OnDeletedDefinition #(string itemString, FileName file, bool wasLastDefinition) + { + }; + + +# +# Function: OnChangedDefinition +# +# Called for each definition changed by . This is called *after* the definition has been changed, so +# don't expect to be able to read the original value. +# +sub OnChangedDefinition #(string itemString, FileName file) + { + }; + + +1; -- cgit 1.4.1