-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbTreeNode.h
More file actions
36 lines (33 loc) · 796 Bytes
/
Copy pathbTreeNode.h
File metadata and controls
36 lines (33 loc) · 796 Bytes
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
#ifndef BTREENODE_H
#define BTREENODE_H
#include <vector>
#include "index.h"
#include <iostream>
#define BYTE char
#define BLOCK_SIZE 4096
enum nodeType{INIT,ROOT,INNODE,LEAF};
class bTreeNode
{
private:
nodeType type;
indexType indtype;
unsigned int valNum;
unsigned int maxNum;
std::vector<unsigned int> ptrList;
std::vector<Index> indexList;
unsigned int parentPtr;
BYTE* blockPtr;
int blockNo;
unsigned int charLength;
bool dirty;
public:
friend class bTree;
bTreeNode();
bTreeNode(indexType it, unsigned int len, nodeType tp, BYTE* bPtr);
~bTreeNode();
void init();
void writeBack();
void testOutput();
bool isFull();
};
#endif