doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
idBTree< objType, keyType, maxChildrenPerNode > Class Template Reference

#include <BTree.h>

Public Member Functions

 idBTree (void)
 
 ~idBTree (void)
 
void Init (void)
 
void Shutdown (void)
 
idBTreeNode< objType, keyType > * Add (objType *object, keyType key)
 
void Remove (idBTreeNode< objType, keyType > *node)
 
objType * Find (keyType key) const
 
objType * FindSmallestLargerEqual (keyType key) const
 
objType * FindLargestSmallerEqual (keyType key) const
 
idBTreeNode< objType, keyType > * GetRoot (void) const
 
int GetNodeCount (void) const
 
idBTreeNode< objType, keyType > * GetNext (idBTreeNode< objType, keyType > *node) const
 
idBTreeNode< objType, keyType > * GetNextLeaf (idBTreeNode< objType, keyType > *node) const
 

Private Member Functions

idBTreeNode< objType, keyType > * AllocNode (void)
 
void FreeNode (idBTreeNode< objType, keyType > *node)
 
void SplitNode (idBTreeNode< objType, keyType > *node)
 
idBTreeNode< objType, keyType > * MergeNodes (idBTreeNode< objType, keyType > *node1, idBTreeNode< objType, keyType > *node2)
 
void CheckTree_r (idBTreeNode< objType, keyType > *node, int &numNodes) const
 
void CheckTree (void) const
 

Private Attributes

idBTreeNode< objType, keyType > * root
 
idBlockAlloc< idBTreeNode
< objType, keyType >, 128 > 
nodeAllocator
 

Detailed Description

template<class objType, class keyType, int maxChildrenPerNode>
class idBTree< objType, keyType, maxChildrenPerNode >

Definition at line 57 of file BTree.h.

Constructor & Destructor Documentation

template<class objType , class keyType , int maxChildrenPerNode>
ID_INLINE idBTree< objType, keyType, maxChildrenPerNode >::idBTree ( void  )

Definition at line 92 of file BTree.h.

template<class objType , class keyType , int maxChildrenPerNode>
ID_INLINE idBTree< objType, keyType, maxChildrenPerNode >::~idBTree ( void  )

Definition at line 98 of file BTree.h.

Member Function Documentation

template<class objType, class keyType, int maxChildrenPerNode>
ID_INLINE idBTreeNode< objType, keyType > * idBTree< objType, keyType, maxChildrenPerNode >::Add ( objType *  object,
keyType  key 
)

Definition at line 114 of file BTree.h.

template<class objType , class keyType , int maxChildrenPerNode>
ID_INLINE idBTreeNode< objType, keyType > * idBTree< objType, keyType, maxChildrenPerNode >::AllocNode ( void  )
private

Definition at line 375 of file BTree.h.

template<class objType , class keyType , int maxChildrenPerNode>
ID_INLINE void idBTree< objType, keyType, maxChildrenPerNode >::CheckTree ( void  ) const
private

Definition at line 502 of file BTree.h.

template<class objType, class keyType, int maxChildrenPerNode>
ID_INLINE void idBTree< objType, keyType, maxChildrenPerNode >::CheckTree_r ( idBTreeNode< objType, keyType > *  node,
int numNodes 
) const
private

Definition at line 469 of file BTree.h.

template<class objType , class keyType, int maxChildrenPerNode>
ID_INLINE objType * idBTree< objType, keyType, maxChildrenPerNode >::Find ( keyType  key) const

Definition at line 264 of file BTree.h.

template<class objType , class keyType, int maxChildrenPerNode>
ID_INLINE objType * idBTree< objType, keyType, maxChildrenPerNode >::FindLargestSmallerEqual ( keyType  key) const

Definition at line 308 of file BTree.h.

template<class objType , class keyType, int maxChildrenPerNode>
ID_INLINE objType * idBTree< objType, keyType, maxChildrenPerNode >::FindSmallestLargerEqual ( keyType  key) const

Definition at line 286 of file BTree.h.

template<class objType, class keyType, int maxChildrenPerNode>
ID_INLINE void idBTree< objType, keyType, maxChildrenPerNode >::FreeNode ( idBTreeNode< objType, keyType > *  node)
private

Definition at line 389 of file BTree.h.

template<class objType, class keyType, int maxChildrenPerNode>
ID_INLINE idBTreeNode< objType, keyType > * idBTree< objType, keyType, maxChildrenPerNode >::GetNext ( idBTreeNode< objType, keyType > *  node) const

Definition at line 340 of file BTree.h.

template<class objType, class keyType, int maxChildrenPerNode>
ID_INLINE idBTreeNode< objType, keyType > * idBTree< objType, keyType, maxChildrenPerNode >::GetNextLeaf ( idBTreeNode< objType, keyType > *  node) const

Definition at line 352 of file BTree.h.

template<class objType , class keyType , int maxChildrenPerNode>
ID_INLINE int idBTree< objType, keyType, maxChildrenPerNode >::GetNodeCount ( void  ) const

Definition at line 335 of file BTree.h.

template<class objType , class keyType , int maxChildrenPerNode>
ID_INLINE idBTreeNode< objType, keyType > * idBTree< objType, keyType, maxChildrenPerNode >::GetRoot ( void  ) const

Definition at line 330 of file BTree.h.

template<class objType , class keyType , int maxChildrenPerNode>
ID_INLINE void idBTree< objType, keyType, maxChildrenPerNode >::Init ( void  )

Definition at line 103 of file BTree.h.

template<class objType, class keyType, int maxChildrenPerNode>
ID_INLINE idBTreeNode< objType, keyType > * idBTree< objType, keyType, maxChildrenPerNode >::MergeNodes ( idBTreeNode< objType, keyType > *  node1,
idBTreeNode< objType, keyType > *  node2 
)
private

Definition at line 437 of file BTree.h.

template<class objType, class keyType, int maxChildrenPerNode>
ID_INLINE void idBTree< objType, keyType, maxChildrenPerNode >::Remove ( idBTreeNode< objType, keyType > *  node)

Definition at line 203 of file BTree.h.

template<class objType , class keyType , int maxChildrenPerNode>
ID_INLINE void idBTree< objType, keyType, maxChildrenPerNode >::Shutdown ( void  )

Definition at line 108 of file BTree.h.

template<class objType, class keyType, int maxChildrenPerNode>
ID_INLINE void idBTree< objType, keyType, maxChildrenPerNode >::SplitNode ( idBTreeNode< objType, keyType > *  node)
private

Definition at line 394 of file BTree.h.

Member Data Documentation

template<class objType, class keyType, int maxChildrenPerNode>
idBlockAlloc<idBTreeNode<objType,keyType>,128> idBTree< objType, keyType, maxChildrenPerNode >::nodeAllocator
private

Definition at line 79 of file BTree.h.

template<class objType, class keyType, int maxChildrenPerNode>
idBTreeNode<objType,keyType>* idBTree< objType, keyType, maxChildrenPerNode >::root
private

Definition at line 78 of file BTree.h.


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