HDK
|
#include <UT_ARTMap.h>
Public Types | |
using | iterator = UT_ARTIterator< T > |
using | key_type = UT_StringHolder |
using | mapped_type = T |
using | const_iterator = const iterator |
Returns the beginning of an iterator used to traverse the full tree. More... | |
Public Member Functions | |
UT_ARTMap () | |
Initialize an empty map. More... | |
UT_NON_COPYABLE (UT_ARTMap) | |
~UT_ARTMap () | |
std::pair< iterator, bool > | insert (const UT_StringHolder &name, const T &data, bool allow_partial=false) |
std::pair< iterator, bool > | insert (const UT_StringHolder &name, T &&value, bool allow_partial=false) |
template<typename... Args> | |
std::pair< iterator, bool > | emplace (const UT_StringHolder &name, Args &&...args) |
std::enable_if_t < std::is_default_constructible_v < T >, T & > | operator[] (const UT_StringHolder &key) |
std::enable_if_t < std::is_default_constructible_v < T >, T & > | operator[] (UT_StringHolder &&key) |
SYS_NO_DISCARD_RESULT iterator | find (UT_StringView prefix) const |
Find the node based on the provided prefix. More... | |
SYS_NO_DISCARD_RESULT bool | contains (const UT_StringHolder &prefix) const |
Check if the tree contains the provided string. More... | |
void | debug (UT_WorkBuffer &wbuf) const |
Write out the tree into the work buffer. This is pretty printed. More... | |
bool | erase (const UT_StringRef &prefix) |
void | clear () |
Clear out the tree. More... | |
SYS_NO_DISCARD_RESULT bool | isEmpty () const |
Returns true if the map has no items currently inserted. More... | |
SYS_NO_DISCARD_RESULT const_iterator | begin () const |
SYS_NO_DISCARD_RESULT iterator | begin () |
Returns the beginning of an iterator used to traverse the full tree. More... | |
SYS_NO_DISCARD_RESULT const_iterator | end () const |
SYS_NO_DISCARD_RESULT iterator | end () |
SYS_NO_DISCARD_RESULT const_iterator | cbegin () const |
SYS_NO_DISCARD_RESULT const_iterator | cend () const |
A basic adaptive radix tree implementation using node4, node16, node48, and node256 for space and performance.
Definition at line 99 of file UT_ARTMap.h.
using UT_ARTMap< T >::const_iterator = const iterator |
Returns the beginning of an iterator used to traverse the full tree.
Definition at line 937 of file UT_ARTMap.h.
using UT_ARTMap< T >::iterator = UT_ARTIterator<T> |
Definition at line 733 of file UT_ARTMap.h.
using UT_ARTMap< T >::key_type = UT_StringHolder |
Definition at line 734 of file UT_ARTMap.h.
using UT_ARTMap< T >::mapped_type = T |
Definition at line 735 of file UT_ARTMap.h.
Initialize an empty map.
Definition at line 746 of file UT_ARTMap.h.
Definition at line 754 of file UT_ARTMap.h.
|
inline |
Definition at line 938 of file UT_ARTMap.h.
|
inline |
Returns the beginning of an iterator used to traverse the full tree.
Definition at line 944 of file UT_ARTMap.h.
|
inline |
Returns the end of an iterator used with begin() to traverse the full tree.
Definition at line 956 of file UT_ARTMap.h.
|
inline |
Returns the end of an iterator used with begin() to traverse the full tree.
Definition at line 959 of file UT_ARTMap.h.
Clear out the tree.
Definition at line 916 of file UT_ARTMap.h.
|
inline |
Check if the tree contains the provided string.
Definition at line 895 of file UT_ARTMap.h.
|
inline |
Write out the tree into the work buffer. This is pretty printed.
Definition at line 901 of file UT_ARTMap.h.
|
inline |
Insert a node into the tree by emplacing its value. This function does not allow specifying partial matches as its meant to be equivalent to STL maps.
Definition at line 792 of file UT_ARTMap.h.
|
inline |
Returns the end of an iterator used with begin() to traverse the full tree.
Definition at line 950 of file UT_ARTMap.h.
Returns the end of an iterator used with begin() to traverse the full tree.
Definition at line 953 of file UT_ARTMap.h.
|
inline |
Erase a given entry based on the prefix. Returns true if the item was removed from the tree.
Definition at line 910 of file UT_ARTMap.h.
|
inline |
Find the node based on the provided prefix.
Definition at line 836 of file UT_ARTMap.h.
|
inline |
Insert a node with the additional option to specify if partial matches are allowed for this item. If you're using UT_ARTMap like a traditional map then partial matches arent something that needs to be considered.
Definition at line 768 of file UT_ARTMap.h.
|
inline |
Insert a node by moving its values instead of copying it. This function additionally supports specifying if partial matches are allowed for this item. If you're using UT_ARTMap like a traditional map then partial matches arent something that needs to be considered.
Definition at line 780 of file UT_ARTMap.h.
|
inline |
Returns true if the map has no items currently inserted.
Definition at line 931 of file UT_ARTMap.h.
|
inline |
Lookup an existing item based on the key. If no item is found a default constructible item is placed into the tree. This function does not support allowing partial matches.
Definition at line 804 of file UT_ARTMap.h.
|
inline |
Lookup an existing item based on the key. If no item is found a default constructible item is placed into the tree. This function does not support allowing partial matches.
Definition at line 821 of file UT_ARTMap.h.