NAP
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IGlyphRepresentation Class Referenceabstract

#include <glyph.h>

Public Member Functions

virtual ~IGlyphRepresentation ()
 
 IGlyphRepresentation (nap::Core &core)
 
 IGlyphRepresentation (const IGlyphRepresentation &other)=delete
 
IGlyphRepresentationoperator= (const IGlyphRepresentation &)=delete
 
 IGlyphRepresentation (IGlyphRepresentation &&other)=delete
 
IGlyphRepresentationoperator= (IGlyphRepresentation &&other)=delete
 

Protected Member Functions

bool init (const Glyph &glyph, utility::ErrorState &error)
 
virtual bool onInit (const Glyph &glyph, utility::ErrorState &error)=0
 

Protected Attributes

nap::CoremCore
 Handle to core instance. More...
 

Description

Interface of a specific type of Glyph representation. This could be an image or 3D mesh constructed from a parent Glyph. Override the onInit method to create your own Glyph representation. This class does not own or manage a Glyph, it only allows you to build a representation. Glyph representations can only be created by a FontInstance.

Inheritance diagram for IGlyphRepresentation:
[legend]
Collaboration diagram for IGlyphRepresentation:
[legend]

Constructor & Destructor Documentation

◆ ~IGlyphRepresentation()

virtual ~IGlyphRepresentation ( )
virtual

Destructor, unloads and destroys the glyph if present

◆ IGlyphRepresentation() [1/3]

Constructor

◆ IGlyphRepresentation() [2/3]

IGlyphRepresentation ( const IGlyphRepresentation other)
delete

◆ IGlyphRepresentation() [3/3]

Member Function Documentation

◆ init()

bool init ( const Glyph glyph,
utility::ErrorState error 
)
protected

Called by the font when a specific Glyph representation is requested. Simply forwards the call to the derived onInit implementation.

Parameters
glyphthe parent glyph, associated with this glyph representation.
errorcontains the error if initialization fails.
Returns
if initialization succeeded or failed.

◆ onInit()

virtual bool onInit ( const Glyph glyph,
utility::ErrorState error 
)
protectedpure virtual

Override this method to implement a specific Glyph representation. The handle to the parent Glyph can't be copied and is owned by the Font.

Parameters
glyphthe parent glyph, associated with this glyph representation.
errorcontains the error if initialization fails.
Returns
if initialization succeeded or failed.

Implemented in Renderable2DMipMapGlyph, and Renderable2DGlyph.

◆ operator=() [1/2]

IGlyphRepresentation& operator= ( const IGlyphRepresentation )
delete

◆ operator=() [2/2]

IGlyphRepresentation& operator= ( IGlyphRepresentation &&  other)
delete

Member Data Documentation

◆ mCore

nap::Core* mCore
protected

Handle to core instance.