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 63 of file FontManager.h.

Constructor & Destructor Documentation

◆ AbstractFontManager()

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

Definition at line 71 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 74 of file FontManager.h.

◆ getCodes()

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

Implements bpp::FontManager< CodeType >.

Definition at line 97 of file FontManager.h.

◆ 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.

Implemented in bpp::AbstractFontManager< int >.

Referenced by bpp::FontManager< int >::~FontManager().

◆ getFont() [2/2]

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

Definition at line 86 of file FontManager.h.

◆ getFonts()

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

Implements bpp::FontManager< CodeType >.

Definition at line 98 of file FontManager.h.

◆ 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 99 of file FontManager.h.

◆ registerFont_()

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

Definition at line 102 of file FontManager.h.

Member Data Documentation

◆ codes_

template<class CodeType>
std::vector<CodeType> bpp::AbstractFontManager< CodeType >::codes_
private

Definition at line 68 of file FontManager.h.

◆ fonts_

template<class CodeType>
std::vector<Font> bpp::AbstractFontManager< CodeType >::fonts_
private

Definition at line 67 of file FontManager.h.


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