NAP
Public Member Functions | Protected Member Functions | List of all members
GlyphCache Class Referencefinal

#include <font.h>

Public Member Functions

 ~GlyphCache ()
 
 GlyphCache (const GlyphCache &other)=delete
 
GlyphCacheoperator= (const GlyphCache &)=delete
 
 GlyphCache (GlyphCache &&other)=delete
 
GlyphCacheoperator= (GlyphCache &&other)=delete
 
IGlyphRepresentationfindRepresentation (const rtti::TypeInfo &type)
 
template<typename T >
T * findRepresentation ()
 
const GlyphgetGlyph () const
 

Protected Member Functions

 GlyphCache (std::unique_ptr< Glyph > parent)
 
void addRepresentation (std::unique_ptr< IGlyphRepresentation > representation)
 

Description

Maps a single glyph to multiple glyph representations. This object is created and managed by a FontInstance.

Constructor & Destructor Documentation

◆ ~GlyphCache()

~GlyphCache ( )

◆ GlyphCache() [1/3]

GlyphCache ( const GlyphCache other)
delete

◆ GlyphCache() [2/3]

GlyphCache ( GlyphCache &&  other)
delete

◆ GlyphCache() [3/3]

GlyphCache ( std::unique_ptr< Glyph parent)
protected

Constructor, only callable by FontInstance

Parameters
parentparent Glyph

Member Function Documentation

◆ addRepresentation()

void addRepresentation ( std::unique_ptr< IGlyphRepresentation representation)
protected

Adds a new glyph representation to the cache. This cache owns the new representation.

◆ findRepresentation() [1/2]

T * findRepresentation
Returns
a Glyph representation of type T, nullptr if not found

◆ findRepresentation() [2/2]

IGlyphRepresentation* findRepresentation ( const rtti::TypeInfo type)
Returns
a Glyph representation of a specific type, nullptr if not found

◆ getGlyph()

const Glyph& getGlyph ( ) const
Returns
parent glyph of this cache

◆ operator=() [1/2]

GlyphCache& operator= ( const GlyphCache )
delete

◆ operator=() [2/2]

GlyphCache& operator= ( GlyphCache &&  other)
delete