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

Manager for sprite fonts. More...

#include <SpriteFontManager.h>

Collaboration diagram for SpriteFontManager:
Collaboration graph

Static Public Member Functions

static void SetDefaultPath (const std::string &defaultPath)
 Sets default file path to access sprite font files. More...
 
static void LoadSpriteFontAndAssignKey (const std::string &fileName, const MapKey &key)
 Loads a sprite font and assigns it to a user defined key. More...
 
static SpriteFontGetSpriteFont (const MapKey &key)
 Gets a sprite font using a user defined key. More...
 

Private Types

typedef std::string MapKey
 
typedef std::map< MapKey, SpriteFont * > StorageMap
 

Private Member Functions

 SpriteFontManager (const SpriteFontManager &)=delete
 
SpriteFontManageroperator= (const SpriteFontManager &)=delete
 
 SpriteFontManager (SpriteFontManager &&)=delete
 
SpriteFontManageroperator= (SpriteFontManager &&)=delete
 
void privSetDefaultPath (const std::string defaultPath)
 
void privLoadSpriteFontAndAssignKey (const std::string &fileName, 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 printSpriteFontLoadedSuccessfully (const std::string &fileName) const
 
SpriteFontprivGetSpriteFont (const MapKey &) const
 
SpriteFonttryToGetSpriteFont (const MapKey &) const
 
void deleteSpriteFonts ()
 

Static Private Member Functions

static SpriteFontManagerGetInstance ()
 
static void Delete ()
 

Private Attributes

std::string _defaultPath
 
StorageMap _storageMap
 

Static Private Attributes

static SpriteFontManagerpSpriteFontManagerInstance = nullptr
 

Friends

class SpriteFontManagerAttorney
 

Detailed Description

Manager for sprite fonts.

All font files must be in the Fonts folder containing both the tga and xml file with the same name (ex: Font1.tga and Font1.xml)


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