15#include <unordered_map>
21using Action = std::function<void()>;
22using ActionKey = std::string_view;
Base class that executes actions either immediately or via a managed queue.
Definition ActionDispatcher.hpp:29
Definition Command.hpp:26
bool isReplaceable() const
Returns true if this command is replaceable (i.e. has a non-null owner and a non-empty key).
Definition Command.hpp:37
const ActionDispatcher * owner
Owner of the command used to identify replaceable actions. If owner == nullptr, this task is non-repl...
Definition Command.hpp:31
Action execute
Callable to execute the action.
Definition Command.hpp:28
ActionKey key
Key used to identify replaceable actions for a specific owner instance. If key is empty,...
Definition Command.hpp:34