Brunot
Loading...
Searching...
No Matches
Any_Action.h
Go to the documentation of this file.
1// File: Any_Action.h
2// Description: A concept (interface) for Objects that can be serialized,
3// specifically by having the save and load functions
4// Author(s): Ori Balashov (ori.balashov@digipen.edu)
5// 2025 / 11 / 07
6// (C) Digipen 2025
7// ____ __ __ __
8// /\__ _\/\ \ /\ \/\ \
9// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
10// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
11// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
12// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
13// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
14
15#pragma once
16
17
18#include <boost/type_erasure/any.hpp>
19#include <boost/type_erasure/member.hpp>
20#include <boost/type_erasure/dynamic_any_cast.hpp>
21#include <boost/type_erasure/any_cast.hpp>
22
24
25#pragma region Setup-Concepts
26
34
36{
37template <typename T = _self>
39 : mpl::vector
40 <
41 copy_constructible<T>
42 , typeid_<T>
43 , has_update<void(float)>
44 , has_render<void() const>
45 , has_shouldRemove<bool() const>
46 , has_setOwner<void(GameObject*)>
47 >
48{
49};
50}
51#pragma endregion
52
53namespace th
54{
55
56using AnyAction = boost::type_erasure::any<
58 boost::type_erasure::_self>;
59
60}
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::ActionConcept<>, boost::type_erasure::_self > AnyAction
Definition Any_Action.h:56
Definition Any_Action.h:48