NaturalDocs::Constants

Exporter
NaturalDocs::Constants

Constants that are used throughout the script.  All are exported by default.

Summary
NaturalDocs::ConstantsConstants that are used throughout the script.
Assumptions
Virtual TypesThese are only groups of constants, but should be treated like typedefs or enums.
MenuEntryTypeThe types of entries that can appear in the menu.
FileStatusWhat happened to a file since Natural Docs’ last execution.
FlagsThese constants can be combined with each other.
Menu Entry FlagsThe various flags that can apply to a menu entry.
Support Functions
IsClassHierarchyReferenceReturns whether the passed ReferenceType belongs to NaturalDocs::ClassHierarchy.

Assumptions

  • No constant here will ever be zero.
  • All constants are exported by default.

Virtual Types

These are only groups of constants, but should be treated like typedefs or enums.  Each one represents a distinct type and their values should only be one of their constants or undef.

MenuEntryType

The types of entries that can appear in the menu.

MENU_TITLEThe title of the menu.
MENU_SUBTITLEThe sub-title of the menu.
MENU_FILEA source file, relative to the source directory.
MENU_GROUPA group.
MENU_TEXTArbitrary text.
MENU_LINKA web link.
MENU_FOOTERFooter text.
MENU_INDEXAn index.
MENU_FORMATThe version of Natural Docs the menu file was generated with.
MENU_ENDOFORIGINALA dummy entry that marks where the original group content ends.  This is used when automatically changing the groups so that the alphabetization or lack thereof can be detected without being affected by new entries tacked on to the end.
MENU_DATAData not meant for user editing.

Dependency

PreviousMenuState.nd depends on these values all being able to fit into a UInt8, i.e.  <= 255.

FileStatus

What happened to a file since Natural Docs’ last execution.

FILE_NEWThe file has been added since the last run.
FILE_CHANGEDThe file has been modified since the last run.
FILE_SAMEThe file hasn’t been modified since the last run.
FILE_DOESNTEXISTThe file doesn’t exist, or was deleted.

Flags

These constants can be combined with each other.

Menu Entry Flags

The various flags that can apply to a menu entry.  You cannot mix flags of different types, since they may overlap.

File Flags

MENU_FILE_NOAUTOTITLEWhether the file is auto-titled or not.

Group Flags

MENU_GROUP_UPDATETITLESThe group should have its auto-titles regenerated.
MENU_GROUP_UPDATESTRUCTUREThe group should be checked for structural changes, such as being removed or being split into subgroups.
MENU_GROUP_UPDATEORDERThe group should be resorted.
MENU_GROUP_HASENDOFORIGINALWhether the group contains a dummy MENU_ENDOFORIGINAL entry.
MENU_GROUP_ISINDEXGROUPWhether the group is used primarily for MENU_INDEX entries.  MENU_TEXT entries are tolerated.
MENU_GROUP_UNSORTEDThe group’s contents are not sorted.
MENU_GROUP_FILESSORTEDThe group’s files are sorted alphabetically.
MENU_GROUP_FILESANDGROUPSSORTEDThe group’s files and sub-groups are sorted alphabetically.
MENU_GROUP_EVERYTHINGSORTEDAll entries in the group are sorted alphabetically.

Support Functions

IsClassHierarchyReference

sub IsClassHierarchyReference #(reference)

Returns whether the passed ReferenceType belongs to NaturalDocs::ClassHierarchy.

sub IsClassHierarchyReference #(reference)
Returns whether the passed ReferenceType belongs to NaturalDocs::ClassHierarchy.
The type of a reference.
A package that handles all the gory details of managing the class hierarchy.
The file used to store the previous state of the menu so as to detect changes.
A dummy entry that marks where the original group content ends.
An index.
Arbitrary text.
Close