daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma once
  2. #include"BigDecimal.h"
  3. #include<iostream>
  4.  
  5. class TreeNode {
  6. private:
  7.     int start;
  8.     int end;
  9.     TreeNode *left, *right;
  10.     //jer pokazuje na levi i desni cvor
  11.     BigDecimal *val;
  12.     //u svakom kljucu se nalazi jedan BigDecimal
  13.     void brisi();
  14.     void premesti(TreeNode& tn);
  15.     void kopiraj(const TreeNode &tn);
  16. public:
  17.     TreeNode(int start, int end, const BigDecimal *value);//konstruktor
  18.    
  19.     ~TreeNode();
  20.     TreeNode(TreeNode &&tn);//premestajuci
  21.     TreeNode(const TreeNode &tn);//kopirajuci
  22.     TreeNode& operator=(const TreeNode &tn);
  23.     TreeNode& operator=(TreeNode &&tn);
  24.     TreeNode *getLeft() const;
  25.     TreeNode *getRight() const;
  26.     int getStart()const;
  27.     int getEnd() const;
  28.     bool covers(int start, int end)const;
  29.     friend std::ostream& operator<<(ostream &other, const TreeNode&tn);
  30.  
  31.    
  32.  
  33.    
  34.  
  35. };
RAW Paste Data
Top