From 4cb7ca42003c177e3acc80075d7594e555966106 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 18 Oct 2024 16:37:02 +0200 Subject: fix command design pattern --- Command.h | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'Command.h') diff --git a/Command.h b/Command.h index b974784..0ad57f9 100644 --- a/Command.h +++ b/Command.h @@ -1,29 +1,7 @@ #pragma once -class Museum; -class View; -class ViewController; - class Command { public: - Command(const Command * c); - Command(Museum & m, View & v, ViewController & c); - Command(Museum & m, View & v); - Command(Museum & m); - -protected: - Museum & get_museum(); - View & get_view(); - ViewController & get_controller(); - -protected: - void set_museum(Museum &); - void set_view(View &); - void set_controller(ViewController &); - -private: - Museum * museum = nullptr; - View * view = nullptr; - ViewController * controller = nullptr; + virtual void execute() = 0; }; -- cgit v1.2.3