115 : m_Value( std::move( value ) )
187 : m_pNode( a_pNode ) {}
210 return &m_pNode->m_Value;
215 return m_pNode == other.m_pNode;
220 return m_pNode->m_Value;
225 return &m_pNode->m_Value;
230 return &m_pNode->m_Value;
265 : m_pNode( a_pNode ) {}
268 : m_pNode( a_rcIterator.m_pNode ) {}
291 return &m_pNode->m_Value;
296 return m_pNode == other.m_pNode;
301 return m_pNode == other.m_pNode;
306 return m_pNode->m_Value;
311 return &m_pNode->m_Value;
316 return &m_pNode->m_Value;
373 const CIterator
End()
const
393 Node* pNode = a_pFrom;
395 while ( pNode != a_pTo )
409 return InsertImpl( pNode );
418 return InsertImpl( pNode );
421 Iterator
Find(
const T& value )
const
425 while ( pCurrentNode != &
ms_oNil )
427 if ( pCurrentNode->operator==( value ) )
449 if ( pNode->operator==( value ) )
473 while ( pCurrentNode != &
ms_oNil )
475 pInsertTo = pCurrentNode;
498 TASSERT(
ms_oNil.red == 0,
"ms_oNil not red in T2GenericRedBlackTree::TreeInsertHelp" );
#define TSTATICCAST(POINTERTYPE, VALUE)
#define TREINTERPRETCAST(TYPE, VALUE)
#define TOSHI_NAMESPACE_START
#define TOSHI_NAMESPACE_END
TFORCEINLINE T2Allocator * GetGlobalAllocator()
T2GenericRedBlackTreeNode * m_pParent
T2GenericRedBlackTreeNode * m_pRight
constexpr T2GenericRedBlackTreeNode()
friend class T2RedBlackTree
friend class T2GenericRedBlackTree
T2GenericRedBlackTreeNode(T2GenericRedBlackTreeNode *pNil)
T2GenericRedBlackTreeNode * m_pLeft
T2GenericRedBlackTreeNode * GetFirstNode() const
size_t GetNumElements() const
static T2GenericRedBlackTreeNode * GetSuccessorOf(const T2GenericRedBlackTreeNode *pNode)
void DeleteFixUp(T2GenericRedBlackTreeNode *pNode)
void LeftRotate(T2GenericRedBlackTreeNode *pNode)
static constinit T2GenericRedBlackTreeNode ms_oNil
T2GenericRedBlackTreeNode * DeleteNode(T2GenericRedBlackTreeNode *pNode)
T2GenericRedBlackTreeNode * Insert(T2GenericRedBlackTreeNode *pNode)
static T2GenericRedBlackTreeNode * GetPredecessorOf(const T2GenericRedBlackTreeNode *pNode)
T2Allocator * m_pAllocator
T2GenericRedBlackTreeNode m_oRoot
T2Allocator * GetAllocator() const
void RightRotate(T2GenericRedBlackTreeNode *pNode)
T2GenericRedBlackTree(T2Allocator *pAllocator)
TBOOL operator!=(const T2RedBlackTreeNode< T > &other) const
TBOOL IsLeftNodeNext(const T &value) const
TBOOL operator>=(const T2RedBlackTreeNode< T > &other) const
TBOOL operator!=(const T &other) const
TBOOL operator==(const T &other) const
T2RedBlackTreeNode(T &&value)
TBOOL operator<(const T2RedBlackTreeNode< T > &other) const
friend class T2RedBlackTree
T2RedBlackTreeNode(const T &value)
TBOOL operator<=(const T2RedBlackTreeNode< T > &other) const
TBOOL operator>(const T2RedBlackTreeNode< T > &other) const
TBOOL operator==(const T2RedBlackTreeNode< T > &other) const
Iterator Insert(T &&value)
T2RedBlackTree(T2Allocator *pAllocator=GetGlobalAllocator())
T2Allocator * GetAllocator() const
void Delete(Node *a_pNode)
Iterator FindNext(const Node *a_pNextAfter, const T &value) const
void Erase(Node *a_pFrom, Node *a_pTo)
TBOOL IsRoot(Node *pNode)
const CIterator End() const
const CIterator Begin() const
Iterator Insert(const T &value)
Iterator Find(const T &value) const
T2RedBlackTreeNode< Pair > Node
TFORCEINLINE Iterator Prev()
TFORCEINLINE Iterator Next()
TFORCEINLINE Node * GetNode()
TFORCEINLINE T & operator*() const
TFORCEINLINE Iterator & operator--()
TFORCEINLINE TBOOL operator==(const Iterator &other) const
TFORCEINLINE Iterator(Node *a_pNode)
TFORCEINLINE Iterator operator--(TINT)
TFORCEINLINE T * operator->() const
TFORCEINLINE T * GetValue()
TFORCEINLINE Iterator & operator++()
TFORCEINLINE Iterator operator++(TINT)
TFORCEINLINE const T & operator*() const
TFORCEINLINE CIterator(const Iterator &a_rcIterator)
TFORCEINLINE TBOOL operator==(const CIterator &other) const
TFORCEINLINE const T * operator->() const
TFORCEINLINE CIterator & operator--()
TFORCEINLINE const Node * GetNode()
TFORCEINLINE TBOOL operator==(const Iterator &other) const
TFORCEINLINE CIterator(const Node *a_pNode)
TFORCEINLINE const T * GetValue() const
TFORCEINLINE CIterator operator++(TINT)
TFORCEINLINE CIterator operator--(TINT)
TFORCEINLINE CIterator & operator++()
TFORCEINLINE CIterator Next()
TFORCEINLINE CIterator Prev()
static TBOOL IsGreaterOrEqual(const T &a, const T &b)
static TBOOL IsLess(const T &a, const T &b)
static TBOOL IsEqual(const T &a, const T &b)
static TBOOL IsLessOrEqual(const T &a, const T &b)
static TBOOL IsGreater(const T &a, const T &b)