-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbt_index.h
41 lines (29 loc) · 860 Bytes
/
bt_index.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
// 91574 Database II - C++ Programming
// Swathi Kurunji, UMass Lowell, MA, 2011
// bt_index.h - definition of class BtreeIndex.
#ifndef BT_INDEX_H
#define BT_INDEX_H
#include<iostream>
#include<cstdlib>
using namespace std;
#include "bt_node.h"
#include "bt_errors.h"
// BtreeIndex class defines the structure of B+tree index nodes
// BtreeIndex is derived from BtreeNode
class BtreeIndex: public BtreeNode
{
public:
BtreeIndex()
{
set_type( INDEX );
set_keyCount(0);
//include all other initializations here
};
virtual ~BtreeIndex();
//insert key of type "KeyId", keyCount of type "int", leftChild and rightChild pointers of type BtreeNode*
Status insertKey( KeyId, int, BtreeNode*& leftChild,
BtreeNode*& rightChild );
Status deleteKey( KeyId, int );
Status searchKey( KeyId, int, BtreeNode*& childPtr );
};
#endif