| GL Studio C++ Runtime API

Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
Image::InstanceListEntry Class Reference

`#include <image.h>`

## Classes
class | FileID

## Public Types
typedef DynamicArray< FileID > | FileIDArray

## Public Member Functions
| InstanceListEntry (Image *img, const FilePathClass &imgPath=FilePathClass(), const LoadOptions &imgLoadOptions=LoadOptions())
| ~InstanceListEntry ()
Image * | GetImage ()
FileIDArray & | GetAssociatedFiles ()
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

typedef DynamicArray<FileID> FileIDArray

array of FileID

## Constructor & Destructor Documentation

## ◆ InstanceListEntry()

InstanceListEntry | ( | Image * | img,
|  | const FilePathClass & | imgPath = `FilePathClass()`,
|  | const LoadOptions & | imgLoadOptions = `LoadOptions()`
| ) |  |

ctor

Parameters

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

## ◆ ~InstanceListEntry()

~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

  fileID | file ID in question

## ◆ DisassociateFileWithImage()

void DisassociateFileWithImage | ( | const FileID & | fileID | ) |

disassociate the given fileID with the image in this entry

Parameters

  fileID | file ID in question

## ◆ FileIsAssociatedWithImage()

bool FileIsAssociatedWithImage | ( | const FileID & | fileID,
|  | FileID & | foundFileID
| ) |  |

determine if the given fileID is associated with this entry

Parameters

  fileID | file 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:

- image.h