NDEVR
API Documentation
ImageData

A container for Images managed by the ImageFactory. More...

Collaboration diagram for ImageData:
[legend]

Public Member Functions

 ImageData (const ImageData &data)
 Copy constructor.
 ImageData (const StringView &id, ImageFactory &image_factory)
 Constructs an ImageData referencing a specific image in the given factory.
 ImageData (ImageData &&data) noexcept
 Move constructor.
 ~ImageData ()
 Destructor.
StringView compressionFormat () const
 Returns the compression format extension of this image's compressed data.
ImageReadPointer getCompressed (const String &default_image_format) const
 Retrieves the compressed data for this image in the specified format.
ImageReadPointer getUncompressed () const
 Retrieves the uncompressed (raw ARGB) pixel data for this image from the factory.
Time modifiedTime () const
 Returns the last modification time of this image.
ImageReadPointer size () const
 Retrieves the image dimensions without fully decompressing the data.

Protected Attributes

const String m_id
 The unique string identifier for this image within the factory.
ImageFactorym_image_factory
 Reference to the owning ImageFactory managing this image's data.

Detailed Description

A container for Images managed by the ImageFactory.


Provides convenience access functions without actually allocating memory outside of the factory.

Definition at line 503 of file ImageFactory.h.

Constructor & Destructor Documentation

◆ ImageData() [1/3]

ImageData::ImageData ( const StringView & id,
ImageFactory & image_factory )

Constructs an ImageData referencing a specific image in the given factory.

Parameters
[in]idThe unique string identifier for the image.
[in]image_factoryThe ImageFactory that manages this image's data.

Referenced by ImageData(), and ImageData().

◆ ImageData() [2/3]

ImageData::ImageData ( const ImageData & data)

Copy constructor.

Parameters
[in]dataThe ImageData to copy from.

References ImageData().

◆ ImageData() [3/3]

ImageData::ImageData ( ImageData && data)
noexcept

Move constructor.

Parameters
[in]dataThe ImageData to move from.

References ImageData().

Member Function Documentation

◆ compressionFormat()

StringView ImageData::compressionFormat ( ) const
nodiscard

Returns the compression format extension of this image's compressed data.

Returns
The format extension string (e.g., ".png"), or empty if unknown.

◆ getCompressed()

ImageReadPointer ImageData::getCompressed ( const String & default_image_format) const
nodiscard

Retrieves the compressed data for this image in the specified format.

Parameters
[in]default_image_formatThe preferred compression format extension (e.g., ".png").
Returns
A read-locked pointer to the image cache data with populated compressed_data.

◆ getUncompressed()

ImageReadPointer ImageData::getUncompressed ( ) const
nodiscard

Retrieves the uncompressed (raw ARGB) pixel data for this image from the factory.

Returns
A read-locked pointer to the image cache data with populated decompressed_data.

◆ modifiedTime()

Time ImageData::modifiedTime ( ) const
nodiscard

Returns the last modification time of this image.

Returns
The modification time of the image.

◆ size()

ImageReadPointer ImageData::size ( ) const
nodiscard

Retrieves the image dimensions without fully decompressing the data.

Returns
A read-locked pointer to the image cache data with populated size field.

The documentation for this class was generated from the following file: