?? node.cpp
字號:
#include ".\node.h"
CNode::CNode()
:m_sign(0),
m_key(0),
m_nodeID(0),
m_parent(0),
m_leftchild(0),
m_rightchild(0),
m_status(CNode::UNTAKEN)
{
}
CNode::~CNode(void)
{
}
void CNode::SetLeftChild(CNode* newLeftChild)
{
this->m_leftchild=newLeftChild;
if(newLeftChild)
newLeftChild->m_parent=this;
}
void CNode::SetRightChild(CNode* newRightChild)
{
this->m_rightchild=newRightChild;
if(newRightChild)
newRightChild->m_parent=this;
}
CNode* CNode::GetSibling(void)
{
if(this->m_parent!=0)
{
if(this==m_parent->m_leftchild)
return m_parent->m_rightchild;
else
return m_parent->m_leftchild;
}
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -