ecs
Entity-Component-System
Loading...
Searching...
No Matches
System.hpp
Go to the documentation of this file.
1
11#ifndef SYSTEM_HPP
12#define SYSTEM_HPP
13
14#include <concepts>
15
16namespace ecs {
17
18 class Registry;
19
29 class ISystem {
30 public:
34 virtual ~ISystem() = default;
35
43 virtual void update(Registry &) = 0;
44 };
45
57 template<typename T>
58 concept SystemImplementation = std::derived_from<std::remove_cvref_t<T>, ISystem>;
59
60}
61
62
65#endif // SYSTEM_HPP
Definition System.hpp:29
virtual ~ISystem()=default
Virtual destructor to allow safe polymorphic destruction.
virtual void update(Registry &)=0
Pure virtual function executed by all concrete systems.
define the Registry class
Definition Registry.hpp:47
Concept that ensures a type derives from System.
Definition System.hpp:58
Entity Component System.