diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-20 18:49:49 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:56 +0200 |
commit | e6644d6b235005de9ba1b9884472fa5f5d8d6074 (patch) | |
tree | b6d10d8e3ee8b092933baa55d35480d438bb6328 /src/interfaces/command.hpp | |
parent | 6f9d9fe1d1904ecc5ca52697ec2319a21008120f (diff) |
refactor: update event system terminology & structure
Diffstat (limited to 'src/interfaces/command.hpp')
-rw-r--r-- | src/interfaces/command.hpp | 11 |
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(); + }; }; |