diff options
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 |