Natural Docs Version 1.2 |
NaturalDocs:: Topics
The topic constants and functions to convert them to and from strings used throughout the script. All constants are exported by default. Summary
Topic TypesConstants representing all the types of Natural Docs sections. DependencyPreviousMenuState.nd depends on these values all being able to fit into a UInt8, i.e. <= 255. names
An array of the topic names. Use the Topic Types as an index into it, except for list types. pluralNames
An array of the topic names, but plural. Use the Topic Types as an index into it, except for list types. constants
A hash where the keys are the names in all lowercase, and the values are the Topic Types. Note that this contains every synonym used in the parser. If the name is plural, it will be a list type. indexable
An existence hash of the Topic Types that should be indexed. AllIndexable
Returns an array of all possible indexable Topic Types. PluralNameOf
Returns the plural name string of the passed constant. Do not ever pass the plural name back to ConstantOf() because plural list topic names will return undef, and plural non-list topic names will return a list topic. ConstantOf
Returns the Topic Types associated with the string, or undef if none. This supports every Natural Docs synonym the parser supports. Note that if the string is plural, it will return a list type. If that’s not desired, use NonListConstantOf() instead. NonListConstantOf
Returns the Topic Types associated with the string, or undef if none. If the result is a list topic, it runs it through IsListOf() before returning it. This supports every Natural Docs synonym the parser supports. |
my @names |
my @pluralNames |
my %constants |
my %indexable |
sub IsList #(topic) |
sub IsListOf #(topic) |
sub IsIndexable #(topic) |
sub AllIndexable |
sub NameOf #(topic) |
sub PluralNameOf #(topic) |
sub ConstantOf #(string) |
sub NonListConstantOf #(string) |