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

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

#include <TextureManager.h>

Collaboration diagram for TextureManager:
Collaboration graph

Public Types

typedef std::string MapKey
 

Static Public Member Functions

static void SetDefaultPath (const std::string &defaultPath)
 Sets default file path to access texture files. More...
 
static void LoadTextureAndAssignKey (const std::string &fileName, const MapKey &key)
 Loads texture and assigns it to a user defined key. More...
 
static void LoadTextureAndAssignKey (const colorValue red, const colorValue green, const colorValue blue, const MapKey &key)
 Loads texture and assigns it to a user defined key. More...
 
static void LoadTextureAndAssignKey (Texture *pTexture, const MapKey &key)
 
static Texture * GetTexture (const MapKey &key)
 Gets a texture with a user defined key. More...
 

Private Types

typedef std::map< MapKey, Texture * > TextureMap
 
typedef unsigned char colorValue
 

Private Member Functions

 TextureManager (const TextureManager &)=delete
 
TextureManageroperator= (const TextureManager &)=delete
 
 TextureManager (const TextureManager &&)=delete
 
TextureManageroperator= (TextureManager &&)=delete
 
void privSetDefaultPath (const std::string &defaultPath)
 
void privLoadTextureAndAssignKey (colorValue red, colorValue green, colorValue blue, const MapKey &key)
 
void privLoadTextureAndAssignKey (const std::string &fileName, const MapKey &key)
 
void privLoadTextureAndAssignKey (Texture *, const MapKey &)
 
bool hasKeyBeenAssigned (const MapKey &key) const
 
void printKeyAssignedErrorAndTerminate (const MapKey &key) const
 
bool isFilePathValid (const std::string &filePath) const
 
void printFileNameErrorAndTerminate (const std::string &fileName) const
 
void printTextureLoadedSuccessfully (const colorValue red, const colorValue green, const colorValue blue) const
 
void printTextureLoadedSuccessfully (const std::string &fileName) const
 
Texture * privGetTexture (const MapKey &key) const
 
Texture * tryToGetTexture (const MapKey &key) const
 
void deleteAllTextures ()
 

Static Private Member Functions

static TextureManagerGetInstance ()
 
static void Delete ()
 
static void DebugPrint (const std::string &message)
 

Private Attributes

std::string _defaultPath
 
TextureMap _textureStorageMap
 

Static Private Attributes

static TextureManagerpTextureManagerInstance = nullptr
 
static const std::string DEBUG_TITLE_MESSAGE = "TextureManager_DEBUG: "
 

Friends

class TextureManagerAttorney
 

Detailed Description

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


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