template<s32 MaxKeyLength, typename Value>
StrTreeMap class
Sorted associative container with fixed-length string keys. This is essentially std::map<char[MaxKeyLength], Value>
Base classes
-
template<typename Key>class TreeMapImpl<SafeString>
Public types
- class Node
- using MapImpl = TreeMapImpl<SafeString>
- using Node = TreeMapNode<SafeString>
Public functions
- void allocBuffer(s32 node_max, Heap* heap, s32 alignment = sizeof(void*))
- void setBuffer(s32 node_max, void* buffer)
- void freeBuffer()
- auto isBufferReady() const -> bool
- auto insert(const SafeString& key, const Value& value) -> Value*
- void clear()
- auto find(const SafeString& key) const -> Node*
-
template<typename Callable>void forEach(const Callable& delegate) const
- void insert(Node* node)
- void erase(const SafeString& key)
- auto startIterating() const -> Node*
- auto nextNode(Node* node) const -> Node*
Protected static functions
- static void forEach(Node* start, const Callable& callable)
- static auto startIterating(Node* node) -> Node*
- static auto rotateLeft(Node* node) -> Node*
- static auto rotateRight(Node* node) -> Node*
- static auto moveRedLeft(Node* node) -> Node*
- static auto moveRedRight(Node* node) -> Node*
- static auto findMin(Node* node) -> Node*
- static auto eraseMin(Node* node) -> Node*
- static auto fixUp(Node* node) -> Node*
- static auto isRed(const Node* node) -> bool
- static void flipColors(Node* node)
Protected functions
Protected variables
Typedef documentation
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
using sead:: StrTreeMap<MaxKeyLength, Value>:: Node = TreeMapNode<SafeString>
Function documentation
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
void sead:: StrTreeMap<MaxKeyLength, Value>:: insert(Node* node)
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
void sead:: StrTreeMap<MaxKeyLength, Value>:: erase(const SafeString& key)
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
Node* sead:: StrTreeMap<MaxKeyLength, Value>:: startIterating() const
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
Node* sead:: StrTreeMap<MaxKeyLength, Value>:: nextNode(Node* node) const
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static void sead:: StrTreeMap<MaxKeyLength, Value>:: forEach(Node* start,
const Callable& callable) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static Node* sead:: StrTreeMap<MaxKeyLength, Value>:: startIterating(Node* node) protected
Returns the left most child of a given node, marking each node with its parent along the way.
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static Node* sead:: StrTreeMap<MaxKeyLength, Value>:: rotateLeft(Node* node) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static Node* sead:: StrTreeMap<MaxKeyLength, Value>:: rotateRight(Node* node) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static Node* sead:: StrTreeMap<MaxKeyLength, Value>:: moveRedLeft(Node* node) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static Node* sead:: StrTreeMap<MaxKeyLength, Value>:: moveRedRight(Node* node) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static Node* sead:: StrTreeMap<MaxKeyLength, Value>:: findMin(Node* node) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static Node* sead:: StrTreeMap<MaxKeyLength, Value>:: eraseMin(Node* node) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static Node* sead:: StrTreeMap<MaxKeyLength, Value>:: fixUp(Node* node) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static bool sead:: StrTreeMap<MaxKeyLength, Value>:: isRed(const Node* node) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
static void sead:: StrTreeMap<MaxKeyLength, Value>:: flipColors(Node* node) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
Node* sead:: StrTreeMap<MaxKeyLength, Value>:: erase(Node* root,
const SafeString& key) protected
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
Node* sead:: StrTreeMap<MaxKeyLength, Value>:: find(Node* root,
const SafeString& key) const protected
Variable documentation
#include <container/seadTreeMap.h>
template<s32 MaxKeyLength, typename Value>
Node* sead:: StrTreeMap<MaxKeyLength, Value>:: mRoot protected