diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 11:26:12 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 11:26:12 +0100 |
commit | 01c09a196c3f3e5cefaa4119a95a1cdeb7b9c263 (patch) | |
tree | 5667369a85bd06b683c67de42bf0311c2647912b /src/crepe/system/System.h | |
parent | 6e13510f3c6d4155707f748d237bb1fa05243450 (diff) | |
parent | 8600b8a29351aae26ec7b22f84aeeef92d8cb421 (diff) |
merge `loek/cleanup` into `loek/audio`
Diffstat (limited to 'src/crepe/system/System.h')
-rw-r--r-- | src/crepe/system/System.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/crepe/system/System.h b/src/crepe/system/System.h index 5091977..36f7edc 100644 --- a/src/crepe/system/System.h +++ b/src/crepe/system/System.h @@ -4,19 +4,28 @@ namespace crepe { -//! ECS system base class +class ComponentManager; + +/** + * \brief Base ECS system class + * + * This class is used as the base for all system classes. Classes derived from + * System must implement the System::update() method and copy Script::Script + * with the `using`-syntax. + */ class System { public: - //! Process components belonging to this system + /** + * \brief Process all components this system is responsible for. + */ virtual void update() = 0; public: - System(); + System(ComponentManager &); virtual ~System() = default; -public: - //! Reference to component manager - ComponentManager & compmgr; +protected: + ComponentManager & component_manager; }; } // namespace crepe |