-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNode.cpp
56 lines (51 loc) · 1000 Bytes
/
Node.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// Created by avrod on 9/22/2020.
//
#ifndef FROGGER_NODE_CPP
#define FROGGER_NODE_CPP
#include "Node.h"
template <class T>
Node<T>::Node(){
}
template <class T>
Node<T>::Node(T data){
this->data = data;
}
template <class T>
const Node<T>* Node<T>::getNext() const{
return next;
}
template <class T>
Node<T>* Node<T>::getNext(){
return next;
}
template <class T>
const Node<T>* Node<T>::getPrev() const{
return prev;
}
template <class T>
Node<T>* Node<T>::getPrev(){
return prev;
}
template <class T>
T& Node<T>::getData() {
return data;
}
template <class T>
void Node<T>::setNext(Node<T>* next){
this->next = next;
}
template <class T>
void Node<T>::setPrev(Node<T>* prev){
this->prev = prev;
}
template <class T>
void Node<T>::setData(T data){
this->data = data;
}
template <class U>
std::ostream& operator <<(std::ostream& outs,const Node<U>& node){
outs << node.data;
return outs;
}
#endif