41 #ifndef BPP_GRAPHICS_FONT_FONTMANAGER_H
42 #define BPP_GRAPHICS_FONT_FONTMANAGER_H
50 #include "../../Text/TextTools.h"
51 #include "../../Exceptions.h"
60 template<
class CodeType>
84 virtual std::vector<CodeType>
getCodes()
const = 0;
89 virtual std::vector<Font>
getFonts()
const = 0;
98 template<
class CodeType>
112 for (
unsigned int i = 0; i <
fonts_.size(); i++)
119 throw Exception(
"AbstractFontManager::getCode. Unknown font: " + font.
toString());
124 for (
unsigned int i = 0; i <
codes_.size(); i++)
void registerFont_(const Font &font, int code)
std::vector< CodeType > codes_
const Font & getFont(int &code) const
size_t getNumberOfFonts() const
std::vector< CodeType > getCodes() const
std::vector< Font > fonts_
std::vector< Font > getFonts() const
CodeType getCode(const Font &font) const
Exception base class. Overload exception constructor (to control the exceptions mechanism)....
Associate special fonts to a code.
virtual std::vector< CodeType > getCodes() const =0
virtual const Font & getFont(CodeType &code) const =0
virtual std::vector< Font > getFonts() const =0
virtual size_t getNumberOfFonts() const =0
virtual CodeType getCode(const Font &font) const =0
Data structure for fonts.
std::string toString() const
std::string toString(T t)
General template method to convert to a string.