command_pattern::Invoker

class Invoker

The Invoker class stores a command and triggers its execution or undo.

Public Functions

inline void setCommand(std::shared_ptr<Command> command)

Sets the command to be executed.

Parameters:

command – The command to set.

inline void pressButton() const

Executes the stored command.

inline void pressUndo() const

Undoes the stored command.