summaryrefslogtreecommitdiff
path: root/algo1w4d2/Queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'algo1w4d2/Queue.h')
-rw-r--r--algo1w4d2/Queue.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/algo1w4d2/Queue.h b/algo1w4d2/Queue.h
new file mode 100644
index 0000000..cf52b12
--- /dev/null
+++ b/algo1w4d2/Queue.h
@@ -0,0 +1,21 @@
+#pragma once
+
+class Klant;
+
+#include <vector>
+#include <memory>
+
+class Queue {
+public:
+ void insert(const Klant&); /** @brief append to queue */
+ std::unique_ptr<Klant> remove(); /** @brief remove and return last queue element */
+ Klant* peek(); /** @brief return but keep last queue element */
+ unsigned size(); /** @brief get size of queue */
+
+public:
+ Queue();
+ virtual ~Queue();
+
+private:
+ std::vector<std::unique_ptr<Klant>> _queue;
+};