Platformer
Platformer
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
LocaleManager Class Reference

This class manages the localization of our game as a singleton. More...

#include <LocaleManager.hpp>

Collaboration diagram for LocaleManager:
Collaboration graph

Public Member Functions

 LocaleManager (const LocaleManager &)=delete
 Stop the compiler from generating methods to copy the object.
 
LocaleManageroperator= (const LocaleManager &)=delete
 Stop the compiler from generating methods to copy the object.
 

Static Public Member Functions

static LocaleManagerinstance ()
 The singleton instance of the LocaleManager.
 
static std::string Lookup (const std::string &key)
 Looks up the given key in the translation map. More...
 

Private Member Functions

 LocaleManager (const std::string &locale)
 Constructs a LocaleManager. More...
 
 ~LocaleManager ()
 Destructs a LocaleManager.
 

Private Attributes

std::unordered_map< std::string, std::string > strings_
 The translation key map.
 

Detailed Description

This class manages the localization of our game as a singleton.

Constructor & Destructor Documentation

◆ LocaleManager()

LocaleManager::LocaleManager ( const std::string &  locale)
private

Constructs a LocaleManager.

Parameters
localeThe localization language

Member Function Documentation

◆ Lookup()

std::string LocaleManager::Lookup ( const std::string &  key)
static

Looks up the given key in the translation map.

Returns
The value of the given key
Parameters
keyThe key to be looked up
Here is the call graph for this function:

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