-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSearchItem.cpp
More file actions
80 lines (67 loc) · 1.44 KB
/
Copy pathSearchItem.cpp
File metadata and controls
80 lines (67 loc) · 1.44 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// SearchItem.cpp: implementation of the SearchItem class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "renlib.h"
#include "SearchItem.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
SearchItem::SearchItem(MoveNode* moveNode)
: mMoveNode(moveNode),
mMergeText(NONE),
mKind(NONE),
mMatch(0)
{
}
SearchItem::SearchItem(MoveNode* moveNode, int nMatch)
: mMoveNode(moveNode),
mMergeText(NONE),
mKind(NONE),
mMatch(nMatch)
{
}
SearchItem::SearchItem(MoveNode* moveNode, const CString& mergeText, SearchItem::MergeKind kind)
: mMoveNode(moveNode),
mMergeText(mergeText),
mKind(kind),
mMatch(0)
{
}
MoveNode* SearchItem::getMoveNode() const
{
return mMoveNode;
}
void SearchItem::setMoveNode(MoveNode* ptr)
{
mMoveNode = ptr;
}
CString SearchItem::getMergeText() const
{
return mMergeText;
}
void SearchItem::emptyMergeText()
{
mMergeText.Empty();
}
SearchItem::MergeKind SearchItem::getKind() const
{
return mKind;
}
int SearchItem::getMatch() const
{
return mMatch;
}
bool SearchItem::operator==(SearchItem& item)
{
return
mMoveNode == item.mMoveNode &&
mMergeText == item.mMergeText &&
mKind == item.mKind &&
mMatch == item.mMatch;
}