GL Studio SCECpp Runtime Library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GlsImage::ImageList Class Reference

#include <gls_image.h>

Public Member Functions

 ImageList (const GlsUInt32 maxNumImages)
 
void AddImage (GlsImage *const image)
 
GlsImageFindImageFromInlineImage (const InlineImage &inlineImage) const
 

Protected Member Functions

virtual ~ImageList ()
 

Protected Attributes

GlsUInt32 _numImages
 
GlsPointerArray _images
 

Detailed Description

This class implements a list of image pointers used for maintaining a list of images that have been instantiated. This list is used when checking for duplicate images

Invariant
_images invariant holds, _numImages <= _images.GetSize(), invariant holds for all images in the list

Constructor & Destructor Documentation

GlsImage::ImageList::ImageList ( const GlsUInt32  maxNumImages)

Constructor - create an empty image list

Parameters
maxNumImagesmaximum number of image pointers to hold in list
Precondition
none
Postcondition
instance created, image list is empty
virtual GlsImage::ImageList::~ImageList ( )
protectedvirtual

Destructor - shall never be called

Precondition
none
Postcondition
none

Member Function Documentation

void GlsImage::ImageList::AddImage ( GlsImage *const  image)

Add an image to the image list

Parameters
imageimage to add
Precondition
image != GLS_NULL, image is not already in the list, image list has room for one more image
Postcondition
image is added to the list
GlsImage* GlsImage::ImageList::FindImageFromInlineImage ( const InlineImage inlineImage) const

Find an image in the list that corresponds to the given inline image

Parameters
inlineImageinline image in question
Returns
pointer to corresponding image else GLS_NULL if not in list
Precondition
inlineImage.IsValid()
Postcondition
none

Member Data Documentation

GlsPointerArray GlsImage::ImageList::_images
protected

array of image pointers

GlsUInt32 GlsImage::ImageList::_numImages
protected

number of images added to _images array