aboutsummaryrefslogtreecommitdiff
path: root/Command.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-15 12:17:21 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-15 12:17:21 +0200
commita3eb81cc6b70c03fb40ac4dcd140d5f3ad241ceb (patch)
tree9d116014f1bb7ff40dab5dbd73a3cb887ef43311 /Command.h
parent28ed8918eaf62969f507fc678b4ac31f195bf257 (diff)
move file loading command + try GUI file loading (still broken)
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;
+};
+