-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCircularListNode.cpp
More file actions
72 lines (48 loc) · 1.32 KB
/
Copy pathCircularListNode.cpp
File metadata and controls
72 lines (48 loc) · 1.32 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
* CircularListNode.cpp
*
* Created on: 14/05/2014
* Author: tavo
*/
#include "CircularListNode.h"
#include <iostream>
CircularListNode::CircularListNode(){
this->value = 0;
this->pointer_next = NULL;
this->pointer_previous = NULL;
}
CircularListNode::CircularListNode(unsigned char val){
this->value = val;
this->pointer_next = NULL;
this->pointer_previous = NULL;
}
CircularListNode::CircularListNode(unsigned char val, CircularListNode * next_node){
this->value = val;
this->pointer_next = next_node;
this->pointer_previous = NULL;
}
CircularListNode::CircularListNode(unsigned char val, CircularListNode * next_node, CircularListNode * previous_node){
this->value = val;
this->pointer_next = next_node;
this->pointer_previous = previous_node;
}
unsigned char CircularListNode::getVal(){
return this->value;
}
void CircularListNode::setVal(unsigned char val){
this->value = val;
}
CircularListNode * CircularListNode::getNext(){
return this->pointer_next;
}
void CircularListNode::setNext(CircularListNode * next_node){
this->pointer_next = next_node;
}
CircularListNode * CircularListNode::getPrevious(){
return this->pointer_previous;
}
void CircularListNode::setPrevious(CircularListNode * previous_node){
this->pointer_previous = previous_node;
}
CircularListNode::~CircularListNode() {
}