/*************************************************
 * ADS Praktikum 1.2
 * TreeNode.cpp
 * Erweiterung um Hilfsfunktionen gestattet.
 *************************************************/
#include "TreeNode.h"
#include <iostream>
#include <string>

TreeNode::TreeNode(int    nNodePos,
    int    id,
    string name,
    int    alter,
    double einkommen,
    int    plz) {
    this->m_NodeOrderID = nNodePos;
    this->m_NodeChronologicalID = id;
    this->m_Name = name;
    this->m_Age = alter;
    this->m_Income = einkommen;
    this->m_PostCode = plz;
    this->m_left = nullptr;
    this->m_right = nullptr;
}


int TreeNode::getNodeOrderID() const {
    return m_NodeOrderID;
}

int TreeNode::getNodeChronologicalID() const {
    return m_NodeChronologicalID;
}

string TreeNode::getName() const {
    return m_Name;
}

int TreeNode::getAge() const {
    return m_Age;
}

double TreeNode::getIncome() const {
    return m_Income;
}

int TreeNode::getPostCode() const {
    return m_PostCode;
}

TreeNode* TreeNode::getLeft() {
    return m_left;
}
TreeNode* TreeNode::getRight() {
    return m_right;
}

void TreeNode::setNodeOrderID(int noID) {
    m_NodeOrderID = noID;
}

void TreeNode::setName(string name) {
    m_Name = name;
}

void TreeNode::setAge(int age) {
    m_Age = age;
}

void TreeNode::setIncome(double income) {
    m_Income = income;
}

void TreeNode::setPostCode(int postcode) {
    m_PostCode = postcode;
}

void TreeNode::setLeft(TreeNode* node) {
    m_left = node;
}

void TreeNode::setRight(TreeNode* node) {
    m_right = node;
}

void print();