From 7e89506f478cbcc62e41cf3c48ecf1654f8c6fe1 Mon Sep 17 00:00:00 2001 From: Hannes Kuchelmeister Date: Sun, 10 Jan 2021 15:14:30 +0100 Subject: [PATCH] modified stack to have an operations queue attached --- Assignment_3/lib/Stack.cpp | 3 ++- Assignment_3/lib/Stack.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Assignment_3/lib/Stack.cpp b/Assignment_3/lib/Stack.cpp index f67c011..5f5a9f5 100644 --- a/Assignment_3/lib/Stack.cpp +++ b/Assignment_3/lib/Stack.cpp @@ -4,9 +4,10 @@ #include #include -Stack::Stack(std::string _name){ +Stack::Stack(ADTOperationQueue * queue){ first = Node::Dummy(); first->next = Node::Dummy(); + op_queue = queue; } bool Stack::push(int element) { return false; } diff --git a/Assignment_3/lib/Stack.h b/Assignment_3/lib/Stack.h index e3b95b9..d4b9a68 100644 --- a/Assignment_3/lib/Stack.h +++ b/Assignment_3/lib/Stack.h @@ -1,11 +1,12 @@ #pragma once #include "Node.h" +#include "ADT_Stack.h" class Stack { protected: - std::string name; - Stack(std::string _name); + ADTOperationQueue * op_queue; + Stack(ADTOperationQueue * queue); Node* first; public: bool push(int element);