-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAIFBS_CS.hpp
63 lines (52 loc) · 1.13 KB
/
AIFBS_CS.hpp
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 "AIFBS_BTreeNode.cpp"
#include "AIFBS_BTree.cpp"
#include "AIFBS_ChunkNodeKey.cpp"
#include "AIFBS_FileNodeKey.cpp"
#include <iostream>
#include <string>
namespace AIFBS
{
struct SplittedNames
{
public:
std::string m_fileName;
std::string m_chunkName;
};
class AIFBS_CS
{
int m_fileT;
int m_chunkT;
AIFBS_BTree<AIFBS_FileNodeKey> *fileTree;
SplittedNames split(std::string);
public:
AIFBS_CS() {
m_fileT = 3;
m_chunkT = 5;
fileTree = new AIFBS_BTree<AIFBS_FileNodeKey>(m_fileT);
}
AIFBS_CS(int t_t) {
m_fileT = t_t;
m_chunkT = t_t;
fileTree = new AIFBS_BTree<AIFBS_FileNodeKey>(m_fileT);
}
AIFBS_CS(int t_fileT, int t_chunkT) {
m_fileT = t_fileT;
m_chunkT = t_chunkT;
fileTree = new AIFBS_BTree<AIFBS_FileNodeKey>(m_fileT);
}
~AIFBS_CS() {
}
void insert(std::string name, int payload);
AIFBS_ChunkNodeKey* find(std::string t_name);
void traverse() {
if(fileTree == NULL)
std::cout<<"Empty FileTree";
else
fileTree->traverse();
}
bool removeFile() {
}
bool remove(std::string chunkDetails);
bool removeFile(std::string fileName);
};
}