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::Tag Class Referencefinal

Tag an entity. More...

#include <Tag.hpp>

Inheritance diagram for galaxy::components::Tag:
Collaboration diagram for galaxy::components::Tag:

Public Member Functions

 Tag ()
 Constructor.
 Tag (std::string_view tag)
 Constructor.
 Tag (const nlohmann::json &json)
 JSON constructor.
 Tag (Tag &&)
 Move constructor.
Tag & operator= (Tag &&)
 Move assignment operator.
virtual ~Tag ()
 Destructor.
nlohmann::json serialize () override
 Serializes object.
void deserialize (const nlohmann::json &json) override
 Deserializes from object.
Public Member Functions inherited from galaxy::Serializable
virtual ~Serializable ()
 Destructor.
virtual Serializable & operator= (Serializable &&) noexcept=default
 Move assignment operator.
virtual Serializable & operator= (const Serializable &) noexcept=default
 Copy assignment operator.

Public Attributes

std::string m_tag
 Tag.

Private Member Functions

Tag & operator= (const Tag &)=delete
 Copy assignment operator.
 Tag (const Tag &)=delete
 Copy constructor.

Additional Inherited Members

Protected Member Functions inherited from galaxy::Serializable
 Serializable () noexcept=default
 Constructor.
 Serializable (Serializable &&) noexcept=default
 Move constructor.
 Serializable (const Serializable &) noexcept=default
 Copy constructor.

Detailed Description

Tag an entity.

Definition at line 20 of file Tag.hpp.

Constructor & Destructor Documentation

◆ Tag() [1/5]

galaxy::components::Tag::Tag ( )

Constructor.

Definition at line 16 of file Tag.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Tag() [2/5]

galaxy::components::Tag::Tag ( std::string_view tag)

Constructor.

Parameters
tagTag for entity.

Definition at line 22 of file Tag.cpp.

Here is the call graph for this function:

◆ Tag() [3/5]

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

JSON constructor.

Parameters
jsonJSON defining object.

Definition at line 28 of file Tag.cpp.

Here is the call graph for this function:

◆ Tag() [4/5]

galaxy::components::Tag::Tag ( Tag && t)

Move constructor.

Definition at line 34 of file Tag.cpp.

Here is the call graph for this function:

◆ ~Tag()

galaxy::components::Tag::~Tag ( )
virtual

Destructor.

Definition at line 51 of file Tag.cpp.

◆ Tag() [5/5]

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

Copy constructor.

Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

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

Move assignment operator.

Definition at line 41 of file Tag.cpp.

Here is the call graph for this function:

◆ serialize()

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

Serializes object.

Returns
JSON object containing data to be serialized.

Implements galaxy::Serializable.

Definition at line 55 of file Tag.cpp.

◆ deserialize()

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

Deserializes from object.

Parameters
jsonJson object to retrieve data from.

Implements galaxy::Serializable.

Definition at line 63 of file Tag.cpp.

Here is the caller graph for this function:

◆ operator=() [2/2]

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

Copy assignment operator.

Here is the call graph for this function:

Member Data Documentation

◆ m_tag

std::string galaxy::components::Tag::m_tag

Tag.

Definition at line 87 of file Tag.hpp.


The documentation for this class was generated from the following files:
  • galaxy/src/galaxy/components/Tag.hpp
  • galaxy/src/galaxy/components/Tag.cpp