1#ifndef SEAD_TREE_MAP_IMPL_H_
2#define SEAD_TREE_MAP_IMPL_H_
4#include <basis/seadTypes.h>
34template <
typename Key>
65 return find(
mRoot, key);
72 return find(key) !=
nullptr;
95 if (node->mLeft_ !=
nullptr)
96 forEach(node->mLeft_, fun);
100 if (node->mRight_ !=
nullptr)
101 forEach(node->mRight_, fun);
112#include <container/seadTreeMapImpl.hpp>
Definition seadTreeMapImpl.h:36
TreeMapImpl()
Definition seadTreeMapImpl.h:41
void forEach(const T &fun) const
Definition seadTreeMapImpl.h:86
Node * mRoot
Definition seadTreeMapImpl.h:105
static Node * moveRedRight(Node *h)
Definition seadTreeMapImpl.hpp:147
static bool isRed(Node *h)
Definition seadTreeMapImpl.hpp:209
Node * find(const Key &key) const
Definition seadTreeMapImpl.h:63
Node * find(Node *node, const Key &key) const
Definition seadTreeMapImpl.hpp:91
Node * erase(Node *h, const Key &key)
Definition seadTreeMapImpl.hpp:48
static void flipColors(Node *h)
Definition seadTreeMapImpl.hpp:200
static Node * min(Node *h)
Definition seadTreeMapImpl.hpp:108
bool contains(const Key &key) const
Definition seadTreeMapImpl.h:70
void erase(const Key &key)
Definition seadTreeMapImpl.h:54
void insert(Node *node)
Definition seadTreeMapImpl.h:46
static void forEach(Node *node, const T &fun)
Definition seadTreeMapImpl.h:93
static Node * rotateRight(Node *h)
Definition seadTreeMapImpl.hpp:188
TreeMapNode< Key > Node
Definition seadTreeMapImpl.h:38
static Node * eraseMin(Node *h)
Definition seadTreeMapImpl.hpp:118
static Node * moveRedLeft(Node *h)
Definition seadTreeMapImpl.hpp:133
static Node * fixUp(Node *h)
Definition seadTreeMapImpl.hpp:160
static Node * rotateLeft(Node *h)
Definition seadTreeMapImpl.hpp:176
Node * insert(Node *h, Node *node)
Definition seadTreeMapImpl.hpp:7
Definition seadTreeMapImpl.h:10
static const bool cBlack_
Definition seadTreeMapImpl.h:31
TreeMapNode< Key > * mRight_
Definition seadTreeMapImpl.h:26
bool mColor_
Definition seadTreeMapImpl.h:27
TreeMapNode()
Definition seadTreeMapImpl.h:12
TreeMapNode< Key > * mLeft_
Definition seadTreeMapImpl.h:25
Key mKey_
Definition seadTreeMapImpl.h:28
static const bool cRed_
Definition seadTreeMapImpl.h:30
virtual ~TreeMapNode()
Definition seadTreeMapImpl.h:19
Definition seadAssert.h:44