NaturalDocs::Project::SourceFile

A simple information class about project files.

Summary
NaturalDocs::Project::SourceFileA simple information class about project files.
Implementation
MembersThe class is implemented as a blessed arrayref.
Functions
NewCreates and returns a new file object.
HasContentReturns whether the file contains Natural Docs content or not.
SetHasContentSets whether the file contains Natural Docs content or not.
LastModifiedReturns the integer timestamp of when the file was last modified.
SetLastModifiedSets the file’s last modification timestamp.
StatusReturns the FileStatus since the last build.
SetStatusSets the FileStatus since the last build.
DefaultMenuTitleReturns the file’s default title on the menu.
SetDefaultMenuTitleSets the file’s default title on the menu.

Implementation

Members

The class is implemented as a blessed arrayref.  The following constants are used as indexes.

HAS_CONTENTWhether the file contains Natural Docs content or not.
LAST_MODIFIEDThe integer timestamp of when the file was last modified.
STATUSFileStatus since the last build.
DEFAULT_MENU_TITLEThe file’s default title in the menu.

Functions

New

sub New #(hasContent,
lastModified,
status,
defaultMenuTitle)

Creates and returns a new file object.

Parameters

hasContentWhether the file contains Natural Docs content or not.
lastModifiedThe integer timestamp of when the file was last modified.
statusThe FileStatus since the last build.
defaultMenuTitleThe file’s title in the menu.

Returns

A reference to the new object.

HasContent

sub HasContent

Returns whether the file contains Natural Docs content or not.

SetHasContent

sub SetHasContent #(hasContent)

Sets whether the file contains Natural Docs content or not.

LastModified

sub LastModified

Returns the integer timestamp of when the file was last modified.

SetLastModified

sub SetLastModified #(lastModified)

Sets the file’s last modification timestamp.

Status

sub Status

Returns the FileStatus since the last build.

SetStatus

sub SetStatus #(status)

Sets the FileStatus since the last build.

DefaultMenuTitle

sub DefaultMenuTitle

Returns the file’s default title on the menu.

SetDefaultMenuTitle

sub SetDefaultMenuTitle #(menuTitle)

Sets the file’s default title on the menu.

sub New #(hasContent,
lastModified,
status,
defaultMenuTitle)
Creates and returns a new file object.
sub HasContent
Returns whether the file contains Natural Docs content or not.
sub SetHasContent #(hasContent)
Sets whether the file contains Natural Docs content or not.
sub LastModified
Returns the integer timestamp of when the file was last modified.
sub SetLastModified #(lastModified)
Sets the file’s last modification timestamp.
sub Status
Returns the FileStatus since the last build.
What happened to a file since Natural Docs’ last execution.
sub SetStatus #(status)
Sets the FileStatus since the last build.
sub DefaultMenuTitle
Returns the file’s default title on the menu.
sub SetDefaultMenuTitle #(menuTitle)
Sets the file’s default title on the menu.
Close