stmm-games-doc  0.32.0
Classes | Public Member Functions | List of all members
stmg::ThemeLoader Class Referenceabstract
Inheritance diagram for stmg::ThemeLoader:
Inheritance graph
[legend]

Classes

struct  ThemeInfo
 

Public Member Functions

virtual ~ThemeLoader () noexcept=default
 
virtual const std::vector< std::string > & getThemeNames () noexcept=0
 The theme names supported by this loader. More...
 
virtual const ThemeInfogetThemeInfo (const std::string &sThemeName) noexcept=0
 The theme information by name. More...
 
virtual shared_ptr< ThemegetTheme (const std::string &sThemeName) noexcept=0
 Get the theme with the given name or a default one. More...
 
virtual const std::string & getDefaultThemeName () noexcept=0
 The default theme name. More...
 

Constructor & Destructor Documentation

◆ ~ThemeLoader()

virtual stmg::ThemeLoader::~ThemeLoader ( )
virtualdefaultnoexcept

Member Function Documentation

◆ getDefaultThemeName()

virtual const std::string& stmg::ThemeLoader::getDefaultThemeName ( )
pure virtualnoexcept

The default theme name.

Returns
The theme name. Can be empty.

Implemented in stmg::XmlThemeLoader.

◆ getTheme()

virtual shared_ptr<Theme> stmg::ThemeLoader::getTheme ( const std::string &  sThemeName)
pure virtualnoexcept

Get the theme with the given name or a default one.

Parameters
sThemeNameThe name of the theme or empty if loader should choose.
Returns
The theme or null if could not load (error string is set in ThemeInfo).

Implemented in stmg::XmlThemeLoader.

◆ getThemeInfo()

virtual const ThemeInfo& stmg::ThemeLoader::getThemeInfo ( const std::string &  sThemeName)
pure virtualnoexcept

The theme information by name.

Parameters
sThemeNameThe name. The theme must exist. Cannot be empty.
Returns
The theme information.

Implemented in stmg::XmlThemeLoader.

◆ getThemeNames()

virtual const std::vector<std::string>& stmg::ThemeLoader::getThemeNames ( )
pure virtualnoexcept

The theme names supported by this loader.

Returns
The (unique) non-empty names of the themes.

Implemented in stmg::XmlThemeLoader.