galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::components::Text Class Referencefinal

String of glyphs rendered with a font. More...

#include <Text.hpp>

+ Inheritance diagram for galaxy::components::Text:
+ Collaboration diagram for galaxy::components::Text:

Public Member Functions

 Text ()
 Constructor.
 
 Text (const nlohmann::json &json)
 JSON constructor.
 
 Text (Text &&)
 Move constructor.
 
Textoperator= (Text &&)
 Move assignment operator.
 
virtual ~Text ()
 Destructor.
 
nlohmann::json serialize () override
 Serializes object.
 
void deserialize (const nlohmann::json &json) override
 Deserializes from object.
 
- Public Member Functions inherited from galaxy::fs::Serializable
virtual ~Serializable ()
 Destructor.
 
virtual Serializableoperator= (Serializable &&)=default
 Move assignment operator.
 
virtual Serializableoperator= (const Serializable &)=default
 Copy assignment operator.
 

Public Attributes

graphics::Text m_text
 Text object.
 

Private Member Functions

 Text (const Text &)=delete
 Copy constructor.
 
Textoperator= (const Text &)=delete
 Copy assignment operator.
 

Additional Inherited Members

- Protected Member Functions inherited from galaxy::fs::Serializable
 Serializable ()
 Constructor.
 

Detailed Description

String of glyphs rendered with a font.

Definition at line 21 of file Text.hpp.

Constructor & Destructor Documentation

◆ Text() [1/4]

galaxy::components::Text::Text ( )

Constructor.

Definition at line 16 of file Text.cpp.

◆ Text() [2/4]

galaxy::components::Text::Text ( const nlohmann::json & json)

JSON constructor.

Parameters
jsonJSON defining object.

Definition at line 21 of file Text.cpp.

+ Here is the call graph for this function:

◆ Text() [3/4]

galaxy::components::Text::Text ( Text && t)

Move constructor.

Definition at line 27 of file Text.cpp.

◆ ~Text()

galaxy::components::Text::~Text ( )
virtual

Destructor.

Definition at line 43 of file Text.cpp.

◆ Text() [4/4]

galaxy::components::Text::Text ( const Text & )
privatedelete

Copy constructor.

Member Function Documentation

◆ operator=() [1/2]

Text & galaxy::components::Text::operator= ( Text && t)

Move assignment operator.

Definition at line 33 of file Text.cpp.

◆ serialize()

nlohmann::json galaxy::components::Text::serialize ( )
nodiscardoverridevirtual

Serializes object.

Returns
JSON object containing data to be serialized.

Implements galaxy::fs::Serializable.

Definition at line 47 of file Text.cpp.

◆ deserialize()

void galaxy::components::Text::deserialize ( const nlohmann::json & json)
overridevirtual

Deserializes from object.

Parameters
jsonJson object to retrieve data from.

Implements galaxy::fs::Serializable.

Definition at line 65 of file Text.cpp.

+ Here is the caller graph for this function:

◆ operator=() [2/2]

Text & galaxy::components::Text::operator= ( const Text & )
privatedelete

Copy assignment operator.

Member Data Documentation

◆ m_text

graphics::Text galaxy::components::Text::m_text

Text object.

Definition at line 81 of file Text.hpp.


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