ecs
Loading...
Searching...
No Matches
System.hpp
Go to the documentation of this file.
1
8#ifndef SYSTEM_HPP
9#define SYSTEM_HPP
10
11#include <concepts>
12
13namespace ecs {
14
15 class Registry;
16
26 class ISystem {
27 public:
31 virtual ~ISystem() = default;
32
40 virtual void update(Registry &) = 0;
41 };
42
54 template<typename T>
55 concept SystemImplementation = std::derived_from<std::remove_cvref_t<T>, ISystem>;
56
57}
58
59
60#endif // SYSTEM_HPP
Definition System.hpp:26
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:44
Concept that ensures a type derives from System.
Definition System.hpp:55
Entity Component System.