A class to track the definitions appearing in a watched file. This is only used for extensions that track definition info with NaturalDocs::SourceDB::ItemDefinition-derived objects. Do not use it for extensions that only track existence.
NaturalDocs:: | A class to track the definitions appearing in a watched file. |
Members | This object would only have one member, which is an array, so the object itself serves as that member. |
New | Creates and returns a new object. |
Definition Functions | |
AddDefinition | Adds a definition for the passed item string. |
GetDefinition | Returns the NaturalDocs::SourceDB::ItemDefinition-derived object for the passed item string or undef if there is none. |
DeleteDefinition | Removes the definition for the passed item string. |
HasDefinitions | Returns whether there are any definitions for this item. |
HasDefinition | Returns whether there is a definition for the passed item string. |
This object would only have one member, which is an array, so the object itself serves as that member.
ExtensionIDs are used as indexes into this object. Each entry is a hashref that maps item strings to NaturalDocs::SourceDB::ItemDefinition-derived objects. This is only done for extensions that use those objects to track definitions, it’s not needed for extensions that only track existence. If there are no definitions, the entry will be undef.
sub AddDefinition #( ExtensionID extension, string itemString, NaturalDocs::SourceDB:: ItemDefinition definition ) => bool
Adds a definition for the passed item string. If it’s already defined, the new definition will be ignored.
extension | The ExtensionID. |
itemString | The item string. |
definition | The definition, which must be an object derived from NaturalDocs::SourceDB::ItemDefinition. |
Whether the definition was added, which is to say, whether this was the first definition for the passed FileName.
sub GetDefinition #( ExtensionID extension, string itemString ) => NaturalDocs::SourceDB::ItemDefinition
Returns the NaturalDocs::SourceDB::ItemDefinition-derived object for the passed item string or undef if there is none.
Creates and returns a new object.
sub New
Adds a definition for the passed item string.
sub AddDefinition #( ExtensionID extension, string itemString, NaturalDocs::SourceDB:: ItemDefinition definition ) => bool
Returns the NaturalDocs::SourceDB::ItemDefinition-derived object for the passed item string or undef if there is none.
sub GetDefinition #( ExtensionID extension, string itemString ) => NaturalDocs::SourceDB::ItemDefinition
Removes the definition for the passed item string.
sub DeleteDefinition #( ExtensionID extension, string itemString ) => bool
Returns whether there are any definitions for this item.
sub HasDefinitions #( ExtensionID extension ) => bool
Returns whether there is a definition for the passed item string.
sub HasDefinition #( ExtensionID extension, string itemString ) => bool