bpp-core3  3.0.0
bpp::AbstractFontManager< CodeType > Class Template Referenceabstract

#include <Bpp/Graphics/Font/FontManager.h>

+ Inheritance diagram for bpp::AbstractFontManager< CodeType >:
+ Collaboration diagram for bpp::AbstractFontManager< CodeType >:

Public Member Functions

 AbstractFontManager ()
 
CodeType getCode (const Font &font) const
 
const FontgetFont (int &code) const
 
std::vector< CodeType > getCodes () const
 
std::vector< FontgetFonts () const
 
size_t getNumberOfFonts () const
 
virtual const FontgetFont (CodeType &code) const =0
 

Protected Member Functions

void registerFont_ (const Font &font, int code)
 

Private Attributes

std::vector< Fontfonts_
 
std::vector< CodeType > codes_
 

Detailed Description

template<class CodeType>
class bpp::AbstractFontManager< CodeType >

Definition at line 99 of file FontManager.h.

Constructor & Destructor Documentation

◆ AbstractFontManager()

template<class CodeType >
bpp::AbstractFontManager< CodeType >::AbstractFontManager ( )
inline

Definition at line 107 of file FontManager.h.

Member Function Documentation

◆ getCode()

template<class CodeType >
CodeType bpp::AbstractFontManager< CodeType >::getCode ( const Font font) const
inlinevirtual
Parameters
fontThe font to look for.
Returns
The code associated to a given font.

Implements bpp::FontManager< CodeType >.

Definition at line 110 of file FontManager.h.

References bpp::AbstractFontManager< CodeType >::codes_, bpp::AbstractFontManager< CodeType >::fonts_, and bpp::Font::toString().

◆ getCodes()

template<class CodeType >
std::vector<CodeType> bpp::AbstractFontManager< CodeType >::getCodes ( ) const
inlinevirtual
Returns
All valid codes.

Implements bpp::FontManager< CodeType >.

Definition at line 133 of file FontManager.h.

References bpp::AbstractFontManager< CodeType >::codes_.

◆ getFont() [1/2]

template<class CodeType >
virtual const Font& bpp::FontManager< CodeType >::getFont ( CodeType &  code) const
pure virtualinherited
Parameters
codeThe code to look for.
Returns
The font associated to a given code.
Exceptions
exceptionif the code is not valid.

◆ getFont() [2/2]

template<class CodeType >
const Font& bpp::AbstractFontManager< CodeType >::getFont ( int &  code) const
inline

◆ getFonts()

template<class CodeType >
std::vector<Font> bpp::AbstractFontManager< CodeType >::getFonts ( ) const
inlinevirtual
Returns
All available fonts.

Implements bpp::FontManager< CodeType >.

Definition at line 134 of file FontManager.h.

References bpp::AbstractFontManager< CodeType >::fonts_.

◆ getNumberOfFonts()

template<class CodeType >
size_t bpp::AbstractFontManager< CodeType >::getNumberOfFonts ( ) const
inlinevirtual
Returns
The total number of fonts available.

Implements bpp::FontManager< CodeType >.

Definition at line 135 of file FontManager.h.

References bpp::AbstractFontManager< CodeType >::fonts_.

◆ registerFont_()

template<class CodeType >
void bpp::AbstractFontManager< CodeType >::registerFont_ ( const Font font,
int  code 
)
inlineprotected

Member Data Documentation

◆ codes_

◆ fonts_


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