//
//  TreeNode.hpp
//  ADS P3
//

#pragma once
#include <string>

using namespace std;

class TreeNode {

private:
	int m_NodeOrderID;
	int m_NodeChronologicalID;
	std::string m_Name;
	int m_Age;
	double m_Income;
	int m_PostCode;
	TreeNode* m_left;
	TreeNode* m_right;
	TreeNode* m_parent;
	bool red;

public:
	TreeNode(int, int, std::string, double, int, int _age = 1);
	~TreeNode();

	int getNodeOrderID() { return m_NodeOrderID; }
	void setNodeOderID(int _id) { m_NodeOrderID = _id; }

	int getNodeChronologicalID() { return m_NodeChronologicalID; }
	void setNodeChronologicalID(int _id) { m_NodeChronologicalID = _id; }

	std::string getName() { return m_Name; }
	void setName(std::string _name) { m_Name = _name; }

	int getAge() { return m_Age; }
	void setAge(int _age) { m_Age = _age; }

	double getIncome() { return m_Income; }
	void setIncome(double _income) { m_Income = _income; }

	int getPostCode() { return m_PostCode; }
	void setPostCode(int _postCode) { m_PostCode = _postCode; }

	bool getRed();
	void setRed(bool _red);

	TreeNode* getLeft() { return m_left; }
	void setLeft(TreeNode* _left) { m_left = _left; }

	TreeNode* getRight() { return m_right; }
	void setRight(TreeNode* _right) { m_right = _right; }

	TreeNode* getParent() { return m_parent; }
	void setParent(TreeNode* _parent) { m_parent = _parent; }

	int depth();

	void printOrderID();
	void print();
};
