// #ifdef STATISTICS #include "Behavioural/include/Stat_binary_tree.h" namespace morpheo { namespace behavioural { // static pair_operator_string_t operator2string [] = {std::make_pair(add,"+" ), // std::make_pair(sub,"-" ), // std::make_pair(mul,"*" ), // std::make_pair(div,"/" ), // std::make_pair(inc,"++"), // std::make_pair(dec,"--")}; // Stat_binary_tree:: Stat_binary_tree (data_type_t data_type, data_t data) // { // _valid_left = false; // _valid_right = false; // _data_type = data_type; // _data = data; // } Stat_binary_tree:: Stat_binary_tree (counter_t cst) { _root = NULL; _left = NULL; _right = NULL; _data_type = NONE; change_type (cst); } Stat_binary_tree:: Stat_binary_tree (counter_t * var) { _root = NULL; _left = NULL; _right = NULL; _data_type = NONE; change_type (var); } Stat_binary_tree:: Stat_binary_tree (operator_t op) { _root = NULL; _left = NULL; _right = NULL; _data_type = NONE; change_type (op); } Stat_binary_tree:: Stat_binary_tree (std::string expr, std::map * operand) { _root = NULL; _left = NULL; _right = NULL; _data_type = NONE; import (expr, operand); } Stat_binary_tree::~Stat_binary_tree (void) { if (_left != NULL) delete _left; if (_right != NULL) delete _right; } }; }; // #endif