Ketchup Engine
Loading...
Searching...
No Matches
FontManager Class Reference

#include <FontManager.h>

Collaboration diagram for FontManager:
Collaboration graph

Public Types

using MapKey = std::string
 
using StorageMap = std::unordered_map< MapKey, SpriteFont * >
 

Static Public Member Functions

static void Load (MapKey k, std::string name)
 Loads a SpriteFont by its name and associates it with Key k.
 
static SpriteFontGet (MapKey k)
 Gets the SpriteFont associated with the given MapKey.
 

Private Member Functions

 FontManager ()=default
 
 FontManager (const FontManager &)=delete
 
FontManageroperator= (const FontManager &)=delete
 
 ~FontManager ()
 

Static Private Member Functions

static FontManagerInstance ()
 
static void Free ()
 

Private Attributes

StorageMap m_fonts
 

Static Private Attributes

static FontManagerp_instance
 

Friends

class FontManagerAttorney
 

Member Typedef Documentation

◆ MapKey

using FontManager::MapKey = std::string

◆ StorageMap

using FontManager::StorageMap = std::unordered_map<MapKey, SpriteFont*>

Constructor & Destructor Documentation

◆ FontManager() [1/2]

FontManager::FontManager ( )
privatedefault

◆ FontManager() [2/2]

FontManager::FontManager ( const FontManager )
privatedelete

◆ ~FontManager()

FontManager::~FontManager ( )
private

Member Function Documentation

◆ Free()

void FontManager::Free ( )
staticprivate

◆ Get()

SpriteFont * FontManager::Get ( MapKey  k)
static

Gets the SpriteFont associated with the given MapKey.

Haru, 3/8/2023.

Parameters
kThe MapKey (string).
Returns
A pointer to the SpriteFont.

◆ Instance()

FontManager * FontManager::Instance ( )
staticprivate

◆ Load()

void FontManager::Load ( MapKey  k,
std::string  name 
)
static

Loads a SpriteFont by its name and associates it with Key k.

Haru, 3/8/2023.

Parameters
kA MapKey (string) to associate the SpriteFont with.
nameThe name of the SpriteFont's .tga and .xml files without extensions.

◆ operator=()

FontManager & FontManager::operator= ( const FontManager )
privatedelete

Friends And Related Function Documentation

◆ FontManagerAttorney

friend class FontManagerAttorney
friend

Member Data Documentation

◆ m_fonts

StorageMap FontManager::m_fonts
private

◆ p_instance

FontManager * FontManager::p_instance
staticprivate

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