⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node.cpp

📁 组播密钥的批次更新算法
💻 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 + -