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::fs::Serializable Class Referenceabstract

Allows a class to be serialized. More...

#include <Serializable.hpp>

+ Inheritance diagram for galaxy::fs::Serializable:
+ Collaboration diagram for galaxy::fs::Serializable:

Public Member Functions

virtual ~Serializable ()
 Destructor.
 
virtual Serializableoperator= (Serializable &&)=default
 Move assignment operator.
 
virtual Serializableoperator= (const Serializable &)=default
 Copy assignment operator.
 
virtual nlohmann::json serialize ()=0
 Serializes object.
 
virtual void deserialize (const nlohmann::json &json)=0
 Deserializes from object.
 

Protected Member Functions

 Serializable ()
 Constructor.
 

Detailed Description

Allows a class to be serialized.

A class wanting to gain serializability must inherit from this class and implement the interface.

Definition at line 22 of file Serializable.hpp.

Constructor & Destructor Documentation

◆ ~Serializable()

galaxy::fs::Serializable::~Serializable ( )
virtual

Destructor.

Definition at line 14 of file Serializable.cpp.

◆ Serializable()

galaxy::fs::Serializable::Serializable ( )
protected

Constructor.

Definition at line 18 of file Serializable.cpp.

Member Function Documentation

◆ operator=() [1/2]

virtual Serializable & galaxy::fs::Serializable::operator= ( Serializable && )
nodiscardvirtualdefault

Move assignment operator.

◆ operator=() [2/2]

virtual Serializable & galaxy::fs::Serializable::operator= ( const Serializable & )
nodiscardvirtualdefault

Copy assignment operator.

◆ serialize()

◆ deserialize()


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