Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::Serializable Class Referenceabstract

#include <Serializable.h>

Inheritance diagram for EngineCore::Serializable:
Collaboration diagram for EngineCore::Serializable:

Public Member Functions

virtual ~Serializable ()=default
virtual void Serialize (nlohmann::json &archive)
virtual void Deserialize (nlohmann::json &archive)=0
virtual std::string getClassName () const

Static Public Member Functions

static std::unique_ptr< Serializablecreate (const std::string &typeName)
static nlohmann::json createDefaultJson (const std::string &typeName)
static const std::vector< std::string > & getRegisteredClasses ()

Static Public Attributes

static const std::string classNameKey = "ClassName"

Detailed Description

Definition at line 7 of file Serializable.h.

Constructor & Destructor Documentation

◆ ~Serializable()

virtual EngineCore::Serializable::~Serializable ( )
virtualdefault

Member Function Documentation

◆ create()

std::unique_ptr< Serializable > EngineCore::Serializable::create ( const std::string & typeName)
inlinestatic

Definition at line 22 of file Serializable.h.

References EngineCore::Factory::create().

Here is the call graph for this function:

◆ createDefaultJson()

nlohmann::json EngineCore::Serializable::createDefaultJson ( const std::string & typeName)
inlinestatic

Definition at line 26 of file Serializable.h.

References EngineCore::Factory::createJson().

Here is the call graph for this function:

◆ Deserialize()

virtual void EngineCore::Serializable::Deserialize ( nlohmann::json & archive)
pure virtual

Implemented in EngineCore::Transform.

◆ getClassName()

virtual std::string EngineCore::Serializable::getClassName ( ) const
inlinenodiscardvirtual

Reimplemented in EngineCore::Transform.

Definition at line 15 of file Serializable.h.

References EngineCore::getTypeName().

Referenced by Serialize().

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

◆ getRegisteredClasses()

const std::vector< std::string > & EngineCore::Serializable::getRegisteredClasses ( )
inlinestatic

Definition at line 30 of file Serializable.h.

References EngineCore::Factory::getRegisteredTypes().

Here is the call graph for this function:

◆ Serialize()

virtual void EngineCore::Serializable::Serialize ( nlohmann::json & archive)
inlinevirtual

Reimplemented in EngineCore::Transform.

Definition at line 10 of file Serializable.h.

References classNameKey, and getClassName().

Referenced by EngineCore::Transform::Serialize().

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

Member Data Documentation

◆ classNameKey

const std::string EngineCore::Serializable::classNameKey = "ClassName"
inlinestatic

Definition at line 19 of file Serializable.h.

Referenced by Serialize().


The documentation for this class was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Serialization/Serializable.h