-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAIFBS_ChunkNodeKey.cpp
62 lines (49 loc) · 1.06 KB
/
AIFBS_ChunkNodeKey.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
/**
*
* @description ChunkTree Key having our entity as payload
**/
#ifndef CHUNKTREE_NODE_KEY_DEF
#define CHUNKTREE_NODE_KEY_DEF
#include <string>
#include "AIFBS_NodeKeyBase.cpp"
namespace AIFBS {
class AIFBS_ChunkNodeKey
{
std::string m_key;
// entity cd;
//all chunck playload can come here
public:
AIFBS_ChunkNodeKey() {
m_key = "default-key";
};
~AIFBS_ChunkNodeKey() {
};
//Must to overload
bool operator< (const AIFBS_ChunkNodeKey& other) {
return m_key < other.m_key;
}
bool operator> (const AIFBS_ChunkNodeKey& other) {
return m_key > other.m_key;
}
bool operator== (const AIFBS_ChunkNodeKey& other) {
return m_key == other.m_key;
}
void Print( std::ostream& out) {
out<<m_key;
}
friend std::ostream& operator<<( std::ostream& out, AIFBS_ChunkNodeKey& b )
{
b.Print( out );
return out;
}
//Overloading Completed
//Getter & Setters
std::string getKey() {
return m_key;
}
void setKey(std::string t_key) {
m_key = t_key;
}
};
}
#endif