From e6644d6b235005de9ba1b9884472fa5f5d8d6074 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 20 Mar 2022 18:49:49 +0100 Subject: refactor: update event system terminology & structure --- src/interfaces/command.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/interfaces/command.hpp') 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 + +class ICommand : public ISubscriber { public: virtual ~ICommand() = default; virtual void execute() noexcept = 0; + + void update(const std::nullptr_t & /*context*/) noexcept override + { + execute(); + }; }; -- cgit v1.2.3-18-g5258