GL Studio C++ Runtime API
Image::InstanceListEntry Class Reference

#include <image.h>

Classes

class  FileID
 

Public Types

typedef DynamicArray< FileIDFileIDArray
 

Public Member Functions

 InstanceListEntry (Image *img, const FilePathClass &imgPath=FilePathClass(), const LoadOptions &imgLoadOptions=LoadOptions())
 
 ~InstanceListEntry ()
 
ImageGetImage ()
 
FileIDArrayGetAssociatedFiles ()
 
bool FileIsAssociatedWithImage (const FileID &fileID, FileID &foundFileID)
 
void AssociateFileWithImage (const FileID &fileID)
 
void DisassociateFileWithImage (const FileID &fileID)
 
bool ReloadImageFromFile ()
 

Protected Attributes

Image_img
 
FileIDArray _associatedFiles
 

Detailed Description

an entry in the Image::InstanceList

Member Typedef Documentation

◆ FileIDArray

Constructor & Destructor Documentation

◆ InstanceListEntry()

InstanceListEntry ( Image img,
const FilePathClass imgPath = FilePathClass(),
const LoadOptions imgLoadOptions = LoadOptions() 
)

ctor

Parameters
imgimage for list entry
imgPath[optional, defaults to ""] optional path to image file associated with image
imgLoadOptions[optional] optional load options associated with image

◆ ~InstanceListEntry()

dtor – NOTE: image associated with entry is not destroyed

Member Function Documentation

◆ AssociateFileWithImage()

void AssociateFileWithImage ( const FileID fileID)

associate the given fileID with the image in this entry

Parameters
fileIDfile ID in question

◆ DisassociateFileWithImage()

void DisassociateFileWithImage ( const FileID fileID)

disassociate the given fileID with the image in this entry

Parameters
fileIDfile ID in question

◆ FileIsAssociatedWithImage()

bool FileIsAssociatedWithImage ( const FileID fileID,
FileID foundFileID 
)

determine if the given fileID is associated with this entry

Parameters
fileIDfile ID in question
foundFileID[out] receives associated file ID if the given fileID is associated with this entry
Returns
true if the given fileID is associated with this entry else false

◆ GetAssociatedFiles()

FileIDArray & GetAssociatedFiles ( )

get the image files associated with the entry

Returns
the image files associated with the entry

◆ GetImage()

Image * GetImage ( )

get the image associated with the entry

Returns
the image associated with the entry

◆ ReloadImageFromFile()

bool ReloadImageFromFile ( )

Attempt to reload the associated image from an associated image file. Associated image will be marked as no longer being a candidate for unloading. NOTE: Image::InstanceListMutex() cannot be locked when calling this method

Returns
true if reload succeeded else false
Precondition
Image::InstanceListMutex() is not locked

Member Data Documentation

◆ _associatedFiles

FileIDArray _associatedFiles
protected

files associated with image else empty array

◆ _img

Image* _img
protected

image associated with entry


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