aboutsummaryrefslogtreecommitdiff
path: root/Command.h
diff options
context:
space:
mode:
Diffstat (limited to 'Command.h')
-rw-r--r--Command.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/Command.h b/Command.h
new file mode 100644
index 0000000..bc511ab
--- /dev/null
+++ b/Command.h
@@ -0,0 +1,32 @@
+#pragma once
+
+class Museum;
+class View;
+class ViewController;
+
+class Command {
+public:
+ virtual void execute() = 0;
+
+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;
+};
+