-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cell.h
55 lines (42 loc) · 1.22 KB
/
Cell.h
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
#ifndef CELLL_H
#define CELLL_H
#include<QString>
class cell
{
/* * * * * * * * * * * * * * * * *
*
* MEMBROS DA CLASSE
*
* * * * * * * * * * * * * * * * */
int size; //tamanho da cell
char element;//elemento
char huffmanRepresentation[15]; // representação de huffman
public:
cell* left; //Aponta para o filho a esquerda
cell* right; //Aponta para o filho a direita
bool leaf; //Verifica se a celula e folha
/* * * * * * * * * * * * * * * * *
*
* CONSTRUTOR
*
* * * * * * * * * * * * * * * * */
cell();
cell(int size, cell* left, cell* right);//construtor de nós que não e folha
cell(char element, int size); //construtor das folhas
/* * * * * * * * * * * * * * * * *
*
* MÉTODOS DA CELL
*
* * * * * * * * * * * * * * * * */
//Indica se a celúla é maior
bool isMore(cell cell);
//Retorna tamanho da Arvore
int getSize();
//Retorna elemento que pertence a folha
char getElement();
//Retorna elemento que pertence a folha
void setHuffmanRepresentation(long int huffman);
//Retorna a representação da codificação de huffman
QString getHuffmanRepresentation();
};
#endif // CELLL_H