aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/System.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-14 11:26:12 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-14 11:26:12 +0100
commit01c09a196c3f3e5cefaa4119a95a1cdeb7b9c263 (patch)
tree5667369a85bd06b683c67de42bf0311c2647912b /src/crepe/system/System.h
parent6e13510f3c6d4155707f748d237bb1fa05243450 (diff)
parent8600b8a29351aae26ec7b22f84aeeef92d8cb421 (diff)
merge `loek/cleanup` into `loek/audio`
Diffstat (limited to 'src/crepe/system/System.h')
-rw-r--r--src/crepe/system/System.h21
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