Brunot
Loading...
Searching...
No Matches
Any_Serializable.h
Go to the documentation of this file.
1// File: Any_Serializable.h
2// Description: A concept (interface) for Objects that can be serialized,
3// specifically by having the save and load funcitons
4// Author(s): Aidan Hartman (aidan.hartman@digipen.edu)
5// 2025 / 11 / 02
6// (C) Digipen 2025
7// Any_Serializable.h
8// ____ __ __ __
9// /\__ _\/\ \ /\ \/\ \
10// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
11// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
12// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
13// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
14// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
15
16#pragma once
17
18
19#include <boost/type_erasure/any.hpp>
20#include <boost/type_erasure/member.hpp>
21#include <boost/type_erasure/dynamic_any_cast.hpp>
22#include <boost/type_erasure/any_cast.hpp>
23
25
26#pragma region Setup-Concepts
27
28namespace boost
29{
32}
33
34namespace boost::type_erasure
35{
36template <typename T = _self>
38 : mpl::vector
39 <
40 copy_constructible<T>
41 , typeid_<T>
42 , has_save<void(Stream&)>
43 , has_load<void(Stream&)>
44 >
45{
46};
47}
48#pragma endregion
49
50namespace th
51{
52
53using AnySerializable = boost::type_erasure::any<
55 boost::type_erasure::_self>;
56
57
58}
the base class for the engine, most things inherit from this.
Definition Any_Action.h:36
Definition Any_Action.h:28
BOOST_TYPE_ERASURE_MEMBER(update)
Definition Factory.cpp:59
boost::type_erasure::any< boost::type_erasure::serializable<>, boost::type_erasure::_self > AnySerializable
Definition Any_Serializable.h:53
Definition Any_Serializable.h:45