FastEngine 0.9.3
A multiplayer oriented 2D engine made with Vulkan.
Loading...
Searching...
No Matches
fge::Font Class Reference

This class is a wrapper for the font manager to allow easy manipulation. More...

#include <C_font.hpp>

Inheritance diagram for fge::Font:
fge::manager::BaseDataAccessor< manager::GlobalDataAccessorManagerInfo< font::FontManager, &font::gManager >, manager::DataAccessorOptions::ALLOW_VARIANT_OF_DATAPOINTER_AND_BLOCKPOINTER >

Public Types

using SharedDataType
 
using SharedType
 

Public Member Functions

virtual void clear ()
 Clear the resource.
 
void reload ()
 Reload the cached resource from the same name.
 
bool valid () const
 Check if the font is valid (not unloaded)
 
SharedDataType const & getSharedBlock () const
 Get the resource block data.
 
SharedType const & getSharedData () const
 Get the shared resource data.
 
std::string const & getName () const
 Get the name of the resource.
 
manager::GlobalDataAccessorManagerInfo< font::FontManager, &font::gManager >::Manager::DataType * retrieve ()
 Retrieve the raw shared pointer from the current resource.
 
manager::GlobalDataAccessorManagerInfo< font::FontManager, &font::gManager >::Manager::DataType const * retrieve () const
 

Detailed Description

This class is a wrapper for the font manager to allow easy manipulation.

Member Function Documentation

◆ clear()

Clear the resource.

This method clear the resource by setting it to the default/bad "valid" resource.

◆ getName()

std::string const & fge::manager::BaseDataAccessor< manager::GlobalDataAccessorManagerInfo< font::FontManager, &font::gManager >, TOption >::getName ( ) const
nodiscardinherited

Get the name of the resource.

Returns
The name of the resource, or an empty string if the resource is not valid

◆ getSharedBlock()

BaseDataAccessor< manager::GlobalDataAccessorManagerInfo< font::FontManager, &font::gManager >, TOption >::SharedDataType const & fge::manager::BaseDataAccessor< manager::GlobalDataAccessorManagerInfo< font::FontManager, &font::gManager >, TOption >::getSharedBlock ( ) const
nodiscardinherited

Get the resource block data.

Warning
If ALLOW_VARIANT_OF_DATAPOINTER_AND_BLOCKPOINTER is set, this method can a "bad" element.
Returns
The resource block data

◆ getSharedData()

BaseDataAccessor< manager::GlobalDataAccessorManagerInfo< font::FontManager, &font::gManager >, TOption >::SharedType const & fge::manager::BaseDataAccessor< manager::GlobalDataAccessorManagerInfo< font::FontManager, &font::gManager >, TOption >::getSharedData ( ) const
nodiscardinherited

Get the shared resource data.

Returns
The shared resource data

◆ reload()

Reload the cached resource from the same name.

◆ retrieve()

Retrieve the raw shared pointer from the current resource.

Warning
Will never be nullptr if the manager was correctly initialized.
Returns
The raw resource pointer

◆ valid()

Check if the font is valid (not unloaded)

Returns
True if the font is valid, false otherwise

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