-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNode.cpp
63 lines (60 loc) · 1.03 KB
/
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
57
58
59
60
61
62
63
#include "Node.h"
Node::Node(){
qFilhos = false;
checkedChild = 0;
}
Node::Node(int freq, bool l, unsigned char cont){
find = false;
frequencia = freq;
content = cont;
leaf = l;
left = 0;
right = 0;
qFilhos = false;
checkedChild = 0;
}
void Node::setCheckedChild(int val){
checkedChild = val;
}
Node::~Node(){
}
int Node::getCheckedChild(){
return checkedChild;
}
void Node::setqFilhos(bool valqFilhos){
qFilhos = valqFilhos;
}
bool Node::getqFilhos(){
return qFilhos;
}
void Node::setFind(bool con){
find = con;
}
bool Node::getFind(){
return find;
}
int Node::getFrequencia(){
return frequencia;
}
unsigned char Node::getContent(){
return content;
}
bool Node::isLeaf(){
return leaf;
}
void Node::setFilhos(Node *esq, Node *dir){
left = esq;
right = dir;
}
void Node::setLeftChild(Node *esq){
left = esq;
}
void Node::setRightChild(Node *dir){
right = dir;
}
Node* Node::getLeftChild(){
return left;
}
Node* Node::getRightChild(){
return right;
}