Open CASCADE Technology 7.8.0
Public Member Functions | Static Public Member Functions
NCollection_UBTree< TheObjType, TheBndType >::TreeNode Class Reference

#include <NCollection_UBTree.hxx>

Public Member Functions

 TreeNode (const TheObjType &theObj, const TheBndType &theBnd)
 
Standard_Boolean IsLeaf () const
 
Standard_Boolean IsRoot () const
 
const TheBndTypeBnd () const
 
TheBndTypeChangeBnd ()
 
const TheObjTypeObject () const
 
const TreeNodeChild (const Standard_Integer i) const
 
TreeNodeChangeChild (const Standard_Integer i)
 
const TreeNodeParent () const
 
TreeNodeChangeParent ()
 
void Gemmate (const TheBndType &theNewBnd, const TheObjType &theObj, const TheBndType &theBnd, const Handle< NCollection_BaseAllocator > &theAlloc)
 
void Kill (const Standard_Integer i, const Handle< NCollection_BaseAllocator > &theAlloc)
 
 ~TreeNode ()
 

Static Public Member Functions

static void delNode (TreeNode *theNode, const Handle< NCollection_BaseAllocator > &theAlloc)
 

Detailed Description

template<class TheObjType, class TheBndType>
class NCollection_UBTree< TheObjType, TheBndType >::TreeNode

Class describing the node of the tree. Initially the tree consists of one leaf. A node can grow to a branch holding two childs:

Constructor & Destructor Documentation

◆ TreeNode()

NCollection_UBTree< TheObjType, TheBndType >::TreeNode::TreeNode ( const TheObjType theObj,
const TheBndType theBnd 
)
inline

◆ ~TreeNode()

NCollection_UBTree< TheObjType, TheBndType >::TreeNode::~TreeNode ( )
inline

Member Function Documentation

◆ Bnd()

const TheBndType & NCollection_UBTree< TheObjType, TheBndType >::TreeNode::Bnd ( ) const
inline

◆ ChangeBnd()

TheBndType & NCollection_UBTree< TheObjType, TheBndType >::TreeNode::ChangeBnd ( )
inline

◆ ChangeChild()

TreeNode & NCollection_UBTree< TheObjType, TheBndType >::TreeNode::ChangeChild ( const Standard_Integer  i)
inline

◆ ChangeParent()

TreeNode & NCollection_UBTree< TheObjType, TheBndType >::TreeNode::ChangeParent ( )
inline

◆ Child()

const TreeNode & NCollection_UBTree< TheObjType, TheBndType >::TreeNode::Child ( const Standard_Integer  i) const
inline

◆ delNode()

static void NCollection_UBTree< TheObjType, TheBndType >::TreeNode::delNode ( TreeNode theNode,
const Handle< NCollection_BaseAllocator > &  theAlloc 
)
inlinestatic

Deleter of tree node. The whole hierarchy of its children also deleted. This method should be used instead of operator delete.

◆ Gemmate()

void NCollection_UBTree< TheObjType, TheBndType >::TreeNode::Gemmate ( const TheBndType theNewBnd,
const TheObjType theObj,
const TheBndType theBnd,
const Handle< NCollection_BaseAllocator > &  theAlloc 
)
inline

Forces *this node being gemmated such a way that it becomes a branch holding the previous content of *this node at the first child and theObj at the second child.

Parameters
theNewBndnew bounding box comprizing both child nodes.
theObjadded object.
theBndbounding box of theObj. @theAlloc allocator providing memory to the new child nodes, provided by the calling Tree instance.

◆ IsLeaf()

Standard_Boolean NCollection_UBTree< TheObjType, TheBndType >::TreeNode::IsLeaf ( ) const
inline

◆ IsRoot()

Standard_Boolean NCollection_UBTree< TheObjType, TheBndType >::TreeNode::IsRoot ( ) const
inline

◆ Kill()

void NCollection_UBTree< TheObjType, TheBndType >::TreeNode::Kill ( const Standard_Integer  i,
const Handle< NCollection_BaseAllocator > &  theAlloc 
)
inline

Kills the i-th child, and *this accepts the content of another child

◆ Object()

const TheObjType & NCollection_UBTree< TheObjType, TheBndType >::TreeNode::Object ( ) const
inline

◆ Parent()

const TreeNode & NCollection_UBTree< TheObjType, TheBndType >::TreeNode::Parent ( ) const
inline

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