mirror of
https://github.com/13hannes11/UU_la_parallel_programming_practical_assignments.git
synced 2024-09-04 00:50:58 +02:00
modified stack to have an operations queue attached
This commit is contained in:
@@ -4,9 +4,10 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include<sstream>
|
#include<sstream>
|
||||||
|
|
||||||
Stack::Stack(std::string _name){
|
Stack::Stack(ADTOperationQueue * queue){
|
||||||
first = Node::Dummy();
|
first = Node::Dummy();
|
||||||
first->next = Node::Dummy();
|
first->next = Node::Dummy();
|
||||||
|
op_queue = queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Stack::push(int element) { return false; }
|
bool Stack::push(int element) { return false; }
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Node.h"
|
#include "Node.h"
|
||||||
|
#include "ADT_Stack.h"
|
||||||
|
|
||||||
class Stack {
|
class Stack {
|
||||||
protected:
|
protected:
|
||||||
std::string name;
|
ADTOperationQueue * op_queue;
|
||||||
Stack(std::string _name);
|
Stack(ADTOperationQueue * queue);
|
||||||
Node* first;
|
Node* first;
|
||||||
public:
|
public:
|
||||||
bool push(int element);
|
bool push(int element);
|
||||||
|
|||||||
Reference in New Issue
Block a user