CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
ISerializable.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10namespace CeresEngine {
11
12 class Serializer;
13 class Deserializer;
14
21 public:
24
25 public:
32 virtual void serialize(Serializer& serializer) const = 0;
33
40 virtual void deserialize(Deserializer& deserializer) = 0;
41 };
42
43} // namespace CeresEngine
The deserializer class has basic support for reflection-based deserializers.
Definition Deserializer.hpp:73
An interface that must be implemented by a class to support custom intrusive serialization.
Definition ISerializable.hpp:20
virtual ~ISerializable() noexcept=default
Defaulted virtual destructor.
virtual void deserialize(Deserializer &deserializer)=0
Deserializes the object from the given stream.
virtual void serialize(Serializer &serializer) const =0
Serializes the object into the given stream.
The serializer class has basic support for reflection-based serializers.
Definition Serializer.hpp:72
Definition Application.hpp:19
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25