Wraith  0.1.5
Basic 3D game engine in C++
ImageManager Class Reference

Manager for images. For loading images and accessing them within user defined games object More...

#include <ImageManager.h>

Collaboration diagram for ImageManager:
Collaboration graph

Static Public Member Functions

static void SetDefaultPath (const std::string &defaultPath)
 Sets default file path to access image files. More...
 
static void LoadImageAndAssignKey (const std::string &fileName, const MapKey &key)
 Loads image and assign it to a user defined key. More...
 
static void LoadImageAndAssignKey (colorValue red, colorValue green, colorValue blue, const MapKey &key)
 Loads image using color values and assign it to a user defined key. More...
 
static void LoadImageAndAssignKey (Texture *pTexture, const MapKey &key)
 Loads image and assign it to a user defined key. More...
 
static void LoadImageAndAssignKey (const std::string &fileName, Rect *pRectangle, const MapKey &key)
 Loads image and assign it to user defined key. More...
 
static void LoadImageAndAssignKey (Texture *pTexture, Rect *pRectangle, const MapKey &key)
 Loads image and assigns it to a user defined key. More...
 
static Image * GetImage (const MapKey &key)
 Gets an image with user defined key. More...
 

Private Types

typedef std::string MapKey
 
typedef std::map< MapKey, Image * > StorageMap
 
typedef unsigned char colorValue
 

Private Member Functions

 ImageManager (const ImageManager &)=delete
 
ImageManageroperator= (const ImageManager &)=delete
 
 ImageManager (ImageManager &&)=delete
 
ImageManageroperator= (ImageManager &&)=delete
 
void privSetDefaultPath (const std::string &defaultPath)
 
void privLoadImageAndAssignKey (const std::string &fileName, const MapKey &)
 
void privLoadImageAndAssignKey (colorValue red, colorValue green, colorValue blue, const MapKey &key)
 
void privLoadImageAndAssignKey (Texture *, const MapKey &)
 
void privLoadImageAndAssignKey (const std::string &fileName, Rect *, const MapKey &)
 
void privLoadImageAndAssignKey (Texture *, Rect *, const MapKey &)
 
bool isFilePathValid (const std::string &filePath) const
 
void printFileNameErrorAndTerminate (const std::string &fileName) const
 
bool hasKeyBeenAssigned (const MapKey &key) const
 
void printKeyAssignedErrorAndTerminate (const MapKey &key) const
 
void printImageLoadedSuccessfully (const std::string &fileName) const
 
void printImageLoadedSuccessfully (colorValue red, colorValue green, colorValue blue) const
 
Image * privGetImage (const MapKey &) const
 
Image * tryToGetImage (const MapKey &) const
 
void deleteImages ()
 

Static Private Member Functions

static ImageManagerGetInstance ()
 
static void Delete ()
 

Private Attributes

std::string _defaultPath
 
StorageMap _imageStorageMap
 

Static Private Attributes

static ImageManagerpImageManagerInstance = nullptr
 

Friends

class ImageManagerAttorney
 

Detailed Description

Manager for images. For loading images and accessing them within user defined games object


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