aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/command.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/command.hpp')
-rw-r--r--src/interfaces/command.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/interfaces/command.hpp b/src/interfaces/command.hpp
index 245bdd6..62d7a59 100644
--- a/src/interfaces/command.hpp
+++ b/src/interfaces/command.hpp
@@ -1,9 +1,18 @@
#pragma once
-class ICommand
+#include "interfaces/subscriber.hpp"
+
+#include <cstddef>
+
+class ICommand : public ISubscriber<std::nullptr_t>
{
public:
virtual ~ICommand() = default;
virtual void execute() noexcept = 0;
+
+ void update(const std::nullptr_t & /*context*/) noexcept override
+ {
+ execute();
+ };
};