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 (void)
 
FileIDArrayGetAssociatedFiles (void)
 
bool FileIsAssociatedWithImage (const FileID &fileID, FileID &foundFileID)
 
void AssociateFileWithImage (const FileID &fileID)
 
void DisassociateFileWithImage (const FileID &fileID)
 
bool ReloadImageFromFile (void)
 

Protected Attributes

Image_img
 
FileIDArray _associatedFiles
 

Detailed Description

an entry in the Image::InstanceList

Member Typedef Documentation

Constructor & Destructor Documentation

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

dtor – NOTE: image associated with entry is not destroyed

Member Function Documentation

void AssociateFileWithImage ( const FileID fileID)

associate the given fileID with the image in this entry

Parameters
fileIDfile ID in question
void DisassociateFileWithImage ( const FileID fileID)

disassociate the given fileID with the image in this entry

Parameters
fileIDfile ID in question
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
FileIDArray& GetAssociatedFiles ( void  )

get the image files associated with the entry

Returns
the image files associated with the entry
Image* GetImage ( void  )

get the image associated with the entry

Returns
the image associated with the entry
bool ReloadImageFromFile ( void  )

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

FileIDArray _associatedFiles
protected

files associated with image else empty array

Image* _img
protected

image associated with entry


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