ECSTASY
All in the name
Loading...
Searching...
No Matches
ISystem.hpp
Go to the documentation of this file.
1
11
12#ifndef ECSTASY_SYSTEM_ISYSTEM_HPP_
13#define ECSTASY_SYSTEM_ISYSTEM_HPP_
14
16
17namespace ecstasy
18{
20 class Registry;
21
28 class ISystem {
29 public:
31 virtual ~ISystem() = default;
32
41 virtual void run(Registry &registry) = 0;
42
54 [[nodiscard]] constexpr Timer &getTimer() noexcept
55 {
56 return _timer;
57 }
58
70 [[nodiscard]] constexpr const Timer &getTimer() const noexcept
71 {
72 return _timer;
73 }
74
75 private:
78 };
79} // namespace ecstasy
80
81#endif /* !ECSTASY_SYSTEM_ISYSTEM_HPP_ */
System interface, base class of all systems.
Definition ISystem.hpp:28
constexpr Timer & getTimer() noexcept
Get the system timer.
Definition ISystem.hpp:54
virtual ~ISystem()=default
Default destructor.
constexpr const Timer & getTimer() const noexcept
Get the system timer.
Definition ISystem.hpp:70
virtual void run(Registry &registry)=0
Run the system.
Timer _timer
Timer to control the execution of the system.
Definition ISystem.hpp:77
Base of an ECS architecture.
Definition Registry.hpp:82
Timer class to control the execution of systems.
Definition Timer.hpp:32
Namespace containing all symbols specific to ecstasy.
Definition ecstasy.hpp:30