Helios++
Helios software for LiDAR simulations
IBinaryTreeNode.h
1 #pragma once
2 
11 public:
12  // *** CONSTRUCTION / DESTRUCTION *** //
13  // ************************************ //
14  virtual ~IBinaryTreeNode() = default;
15 
16  // *** BINARY TREE INTERFACE *** //
17  // ******************************* //
22  virtual IBinaryTreeNode * getLeftChild() const = 0;
27  virtual IBinaryTreeNode * getRightChild() const = 0;
32  virtual bool isLeafNode() const
33  {return getLeftChild()==nullptr && getRightChild()==nullptr;}
34 
35 };
Binary tree node interface that must be implemented by any class providing binary tree node based fun...
Definition: IBinaryTreeNode.h:10
virtual IBinaryTreeNode * getLeftChild() const =0
Obtain the left child of current node.
virtual IBinaryTreeNode * getRightChild() const =0
Obtain the right child of current node.
virtual bool isLeafNode() const
Check whether current node is a leaf node (true) or not (false)
Definition: IBinaryTreeNode.h:32