HDK
|
A simple radix tree implementation. More...
#include <NET_RadixTree.h>
Classes | |
class | Node |
Public Types | |
using | NodeT = UT_IntrusivePtr< Node > |
Public Member Functions | |
void | insert (const UT_StringHolder &name, const T &data, bool allow_partial=false) |
Insert a node. More... | |
NodeT | find (const UT_StringHolder &prefix) const |
Find the node based on the provided prefix. More... | |
SYS_NO_DISCARD_RESULT NodeT | match (const UT_StringHolder &prefix) const |
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... | |
void | clear () |
Clear out the tree. More... | |
A simple radix tree implementation.
Definition at line 33 of file NET_RadixTree.h.
using NET_RadixTree< T >::NodeT = UT_IntrusivePtr<Node> |
Definition at line 38 of file NET_RadixTree.h.
|
inline |
Clear out the tree.
Definition at line 336 of file NET_RadixTree.h.
|
inline |
Check if the tree contains the provided string.
Definition at line 317 of file NET_RadixTree.h.
|
inline |
Write out the tree into the work buffer. This is pretty printed.
Definition at line 325 of file NET_RadixTree.h.
|
inline |
Find the node based on the provided prefix.
Definition at line 264 of file NET_RadixTree.h.
|
inline |
Insert a node.
Definition at line 254 of file NET_RadixTree.h.
|
inline |
Find the node that fully matches the prefix or partially matches based on the tree node being setup for it. Basically this method only returns a viable node if it "fully" matches the prefix. Use find() if you want find any node that will either partially match or fully match the prefix.
Definition at line 306 of file NET_RadixTree.h.