Open CASCADE Technology
7.3.0
|
#include <NCollection_EBTree.hxx>
Public Types | |
typedef NCollection_UBTree< TheObjType, TheBndType > | UBTree |
typedef TYPENAME UBTree::TreeNode | TreeNode |
Public Member Functions | |
NCollection_EBTree (const Handle< NCollection_BaseAllocator > &theAllocator=0L) | |
Standard_Boolean | Add (const TheObjType &theObj, const TheBndType &theBnd) override |
Standard_Boolean | Remove (const TheObjType &theObj) |
Standard_Boolean | Contains (const TheObjType &theObj) const |
const TreeNode & | FindNode (const TheObjType &theObj) const |
void | Clear (const Handle< NCollection_BaseAllocator > &aNewAlloc=0L) override |
Public Member Functions inherited from NCollection_UBTree< TheObjType, TheBndType > | |
NCollection_UBTree () | |
NCollection_UBTree (const Handle< NCollection_BaseAllocator > &theAllocator) | |
virtual Standard_Integer | Select (Selector &theSelector) const |
Standard_Boolean | IsEmpty () const |
const TreeNode & | Root () const |
virtual | ~NCollection_UBTree () |
const Handle< NCollection_BaseAllocator > & | Allocator () const |
Additional Inherited Members | |
Protected Member Functions inherited from NCollection_UBTree< TheObjType, TheBndType > | |
TreeNode & | ChangeLastNode () |
Standard_Integer | Select (const TreeNode &theBranch, Selector &theSelector) const |
The algorithm of unbalanced binary tree of overlapped bounding boxes with the possibility of deleting objects from the tree.
In addition to the requirements to the object type defined in the parent class this class requires that the object can be hashed and compared to another object (functions HashCode and IsEqual are defined for it), since the class NCollection_DataMap is used where the object plays the role of the key.
typedef TYPENAME UBTree::TreeNode NCollection_EBTree< TheObjType, TheBndType >::TreeNode |
typedef NCollection_UBTree<TheObjType, TheBndType> NCollection_EBTree< TheObjType, TheBndType >::UBTree |
|
inline |
Constructor.
|
inlineoverridevirtual |
Updates the tree with a new object and its bounding box. Extends the functionality of the parent method by maintaining the map myObjNodeMap. Redefined virtual method.
Reimplemented from NCollection_UBTree< TheObjType, TheBndType >.
|
inlineoverridevirtual |
Clears the contents of the tree. Redefined virtual method
Reimplemented from NCollection_UBTree< TheObjType, TheBndType >.
|
inline |
|
inline |
Standard_Boolean NCollection_EBTree< TheObjType, TheBndType >::Remove | ( | const TheObjType & | theObj | ) |
Removes the given object and updates the tree.