NaturalDocs::SourceDB::Item |
A base class for something being tracked in NaturalDocs::SourceDB.
NaturalDocs:: | A base class for something being tracked in NaturalDocs::SourceDB. |
Members | The following constants are indexes into the object array. |
New | Creates and returns a new object. |
Definition Functions | These functions should be called by NaturalDocs::SourceDB. |
AddDefinition | Adds a definition for the passed FileName. |
ChangeDefinition | Changes the definition for the passed FileName. |
GetDefinition | Returns the NaturalDocs::SourceDB::ItemDefinition-derived object for the passed FileName, non-zero if it only tracks existence, or undef if there is no definition. |
DeleteDefinition | Removes the definition for the passed FileName. |
HasDefinitions | Returns whether there are any definitions for this item. |
HasDefinition | Returns whether there is a definition for the passed FileName. |
GetAllDefinitionsHashRef | Returns a hashref of all the definitions of this item. |
The following constants are indexes into the object array.
DEFINITIONS | A hashref that maps FileNames to either NaturalDocs::SourceDB::ItemDefinition-derived objects or serves as an existence hashref depending on whether the extension only tracks existence. Will be undef if there are none. |
These functions should be called by NaturalDocs::SourceDB. You should not be calling them directly. Call functions like NaturalDocs::SourceDB->AddDefinition() instead.
sub AddDefinition #( FileName file, optional NaturalDocs::SourceDB:: ItemDefinition definition ) => bool
Adds a definition for the passed FileName. If it’s already defined, the new definition will be ignored.
file | The FileName. |
definition | The definition, which must be an object derived from NaturalDocs::SourceDB::ItemDefinition or undef if the extension only tracks existence. |
Whether the definition was added, which is to say, whether this was the first definition for the passed FileName.
sub ChangeDefinition #( FileName file, NaturalDocs::SourceDB:: ItemDefinition definition )
Changes the definition for the passed FileName.
file | The FileName. |
definition | The definition, which must be an object derived from NaturalDocs::SourceDB::ItemDefinition. |
sub GetDefinition #( FileName file ) => NaturalDocs::SourceDB::ItemDefinition or bool
Returns the NaturalDocs::SourceDB::ItemDefinition-derived object for the passed FileName, non-zero if it only tracks existence, or undef if there is no definition.
sub DeleteDefinition #( FileName file ) => bool
Removes the definition for the passed FileName. Returns whether it was successful, meaning whether a definition existed for that file.
sub HasDefinition #( FileName file ) => bool
Returns whether there is a definition for the passed FileName.
sub GetAllDefinitionsHashRef
Returns a hashref of all the definitions of this item. Do not change. The keys are the FileNames, and the values are either NaturalDocs::SourceDB::ItemDefinition-derived objects or it’s just an existence hashref if those aren’t used.
Creates and returns a new object.
sub New
Adds a definition for the passed FileName.
sub AddDefinition #( FileName file, optional NaturalDocs::SourceDB:: ItemDefinition definition ) => bool
Changes the definition for the passed FileName.
sub ChangeDefinition #( FileName file, NaturalDocs::SourceDB:: ItemDefinition definition )
Returns the NaturalDocs::SourceDB::ItemDefinition-derived object for the passed FileName, non-zero if it only tracks existence, or undef if there is no definition.
sub GetDefinition #( FileName file ) => NaturalDocs::SourceDB::ItemDefinition or bool
Removes the definition for the passed FileName.
sub DeleteDefinition #( FileName file ) => bool
Returns whether there are any definitions for this item.
sub HasDefinitions # => bool
Returns whether there is a definition for the passed FileName.
sub HasDefinition #( FileName file ) => bool
Returns a hashref of all the definitions of this item.
sub GetAllDefinitionsHashRef
Adds a definition to an item.
sub AddDefinition #( ExtensionID extension, string itemString, FileName file, optional NaturalDocs::SourceDB:: ItemDefinition definition ) => bool