ScummVM API documentation
hpl::BinTree< T > Class Template Reference

Public Member Functions

int Clear ()
 
BinTreeNode< T > * Insert (T aData)
 
BinTreeNode< T > * InsertAt (T aData, BinTreeNode< T > *aNode, eBinTreeNode aChild=eBinTreeNode_Left)
 
int Size ()
 
const Common::List< BinTreeNode< T > * > & GetLeafList ()
 
const Common::List< BinTreeNode< T > * > & GetNodeList ()
 

Member Function Documentation

◆ Clear()

template<class T>
int hpl::BinTree< T >::Clear ( )
inline

Clears the entire tree

Returns
number of nodes deleted

◆ Insert()

template<class T>
BinTreeNode<T>* hpl::BinTree< T >::Insert ( aData)
inline

Insert a node to the tree.

Parameters
aDatathe data to insert
Returns

◆ InsertAt()

template<class T>
BinTreeNode<T>* hpl::BinTree< T >::InsertAt ( aData,
BinTreeNode< T > *  aNode,
eBinTreeNode  aChild = eBinTreeNode_Left 
)
inline

Insert a node into a certain node in the tree

Parameters
aDatathe data to insert
aNodethe node to insert the data in
aChildwhat child to insert at
Returns

◆ Size()

template<class T>
int hpl::BinTree< T >::Size ( )
inline

Get the size of the tree

Returns

◆ GetNodeList()

template<class T>
const Common::List<BinTreeNode<T> *>& hpl::BinTree< T >::GetNodeList ( )
inline

Get a list of all the nodes in the tree

Returns

The documentation for this class was generated from the following file: