#pragma once

class CTreeNode
{
public:
	CTreeNode(CPoint point, int weight, CTreeNode *parent);
	~CTreeNode();
	void SetWeight(int weight) {m_nWeight = weight;}
	int GetWeight() {return m_nWeight;}
	//int GetKey() {return m_nWeight;}
	void SetLeft(CTreeNode *node) {nodeLeft = node;}
	CTreeNode* GetLeft() {return nodeLeft;}
	void SetRight(CTreeNode *node) {nodeRight = node;}
	CTreeNode* GetRight() {return nodeRight;}
	bool HasParent() {return nodeParent != NULL;}
	bool HasLeft() {return nodeLeft != NULL;}
	bool HasRight() {return nodeRight != NULL;}
	CTreeNode *GetParent() {return nodeParent;}
	CPoint* GetPoint() {return &m_point;}

private:
public:
private:
	CTreeNode *nodeLeft, *nodeRight, *nodeParent;
	int m_nWeight;
	CPoint m_point;
};
