A simple information class about project image files.
NaturalDocs:: | A simple information class about project image files. |
Implementation | |
Members | The class is implemented as a blessed arrayref. |
WasUsed versus References | WasUsed() is a simple true/false that notes whether this image file was used the last time Natural Docs was run. |
Functions | |
New | Creates and returns a new file object. |
LastModified | Returns the integer timestamp of when the file was last modified. |
SetLastModified | Sets the file’s last modification timestamp. |
Status | Returns the FileStatus since the last build. |
SetStatus | Sets the FileStatus since the last build. |
ReferenceCount | Returns the current number of references to this image file during this Natural Docs execution. |
AddReference | Increases the number of references to this image file by one. |
DeleteReference | Decreases the number of references to this image file by one. |
WasUsed | Returns whether this image file was used during the last Natural Docs execution. |
SetWasUsed | Sets whether this image file was used during the last Natural Docs execution. |
Width | Returns the width in pixels, undef if it can’t be determined, and -1 if determination hasn’t been attempted yet. |
Height | Returns the width in pixels, undef if it can’t be determined, and -1 if determination hasn’t been attempted yet. |
SetDimensions | Sets the width and height of the image. |
The class is implemented as a blessed arrayref. The following constants are used as indexes.
LAST_MODIFIED | The integer timestamp of when the file was last modified. |
STATUS | FileStatus since the last build. |
REFERENCE_COUNT | The number of references to the image from the source files. |
WAS_USED | Whether the image was used the last time Natural Docs was run. |
WIDTH | The image width. Undef if can’t be determined, -1 if haven’t attempted to determine yet. |
HEIGHT | The image height. Undef if can’t be determined, -1 if haven’t attempted to determine yet. |
WasUsed() is a simple true/false that notes whether this image file was used the last time Natural Docs was run. ReferenceCount() is a counter for the number of times it’s used this run. As such, it starts at zero regardless of whether WasUsed() is set or not.
sub New #( timestamp lastModified, FileStatus status, bool wasUsed )
Creates and returns a new file object.
lastModified | The image file’s last modification timestamp |
status | The FileStatus. |
wasUsed | Whether this image file was used the last time Natural Docs was run. |
Returns the FileStatus since the last build.
Sets the FileStatus since the last build.
Creates and returns a new file object.
sub New #( timestamp lastModified, FileStatus status, bool wasUsed )
Increases the number of references to this image file by one.
sub AddReference
Decreases the number of references to this image file by one.
sub DeleteReference
Sets the width and height of the image.
sub SetDimensions #( int width, int height )