[#BloombergLP-ball-CategoryManager_RadixTree] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::CategoryManager_RadixTree :relfileprefix: ../../ :mrdocs: Space‐efficient associative container mapping string keys to `t_VALUE`. == Synopsis Declared in `<ball_categorymanager_radixtree.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_VALUE> class CategoryManager_RadixTree; ---- == Description This class template implements a space‐efficient associative container that maps string keys to values of the specified `t_VALUE` type. The container uses a radix tree (compressed trie) data structure, which shares common prefixes among keys. The container provides O(k) insertion, lookup, and removal operations, where k is the key length. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/CategoryManager_RadixTree/EmplaceResult.adoc[`EmplaceResult`] | Result of emplacing a value into the tree. | xref:BloombergLP/ball/CategoryManager_RadixTree/OptValueCRef.adoc[`OptValueCRef`] | Type for immutable access to the optional value. Used also as return type for immutable finders where empty optional signifies "not found". | xref:BloombergLP/ball/CategoryManager_RadixTree/OptValueRef.adoc[`OptValueRef`] | Type for mutable access to the optional value. Used also as return type for mutable finders where empty optional signifies "not found". | xref:BloombergLP/ball/CategoryManager_RadixTree/allocator_type.adoc[`allocator_type`] | `allocator_type` is an alias for the type of allocator used by this class. | xref:BloombergLP/ball/CategoryManager_RadixTree/size_type.adoc[`size_type`] | `size_type` is an alias for the type used to represent sizes in this tree. | xref:BloombergLP/ball/CategoryManager_RadixTree/value_type.adoc[`value_type`] | `value_type` is an alias for the value type stored in this tree. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/CategoryManager_RadixTree/2constructor-0e.adoc[`CategoryManager_RadixTree`] [.small]#[constructor]# | Constructors | xref:BloombergLP/ball/CategoryManager_RadixTree/operator_assign-0c.adoc[`operator=`] | Assignment operators | xref:BloombergLP/ball/CategoryManager_RadixTree/clear.adoc[`clear`] | Remove all entries from this tree. After this call `empty()` will return `true`. After this call the tree will have 0 nodes. | xref:BloombergLP/ball/CategoryManager_RadixTree/contains.adoc[`contains`] | Return `true` if this tree contains an entry for the specified `key`, and `false` otherwise. | xref:BloombergLP/ball/CategoryManager_RadixTree/countNodes.adoc[`countNodes`] | Return the total number of nodes in this tree. | xref:BloombergLP/ball/CategoryManager_RadixTree/emplace.adoc[`emplace`] | Insert an entry with the specified `key` and a newly constructed value. | xref:BloombergLP/ball/CategoryManager_RadixTree/empty.adoc[`empty`] | Return `true` if this tree contains no entries, and `false` otherwise. | xref:BloombergLP/ball/CategoryManager_RadixTree/erase.adoc[`erase`] | Remove from this tree the entry with the specified `key`. Return `true` if the entry was removed (key existed), and `false` otherwise. | xref:BloombergLP/ball/CategoryManager_RadixTree/eraseChildrenOfPrefix.adoc[`eraseChildrenOfPrefix`] | Remove all children of the entry matching the specified `prefix`. | xref:BloombergLP/ball/CategoryManager_RadixTree/erasePrefix.adoc[`erasePrefix`] | Remove all entries with keys that have the specified `prefix`. | xref:BloombergLP/ball/CategoryManager_RadixTree/find-00.adoc[`find`] | `find` overloads | xref:BloombergLP/ball/CategoryManager_RadixTree/findLongestCommonPrefix-0a.adoc[`findLongestCommonPrefix`] | Return the longest matching key prefix with an associated value. | xref:BloombergLP/ball/CategoryManager_RadixTree/forEach-0a.adoc[`forEach`] | Call the specified `functor` for each key‐value pair in this tree. | xref:BloombergLP/ball/CategoryManager_RadixTree/forEachPrefix-0f.adoc[`forEachPrefix`] | Call `functor` for each key‐value pair whose key starts with `prefix`. | xref:BloombergLP/ball/CategoryManager_RadixTree/get_allocator.adoc[`get_allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/ball/CategoryManager_RadixTree/printNodes.adoc[`printNodes`] | Write this object to the specified `stream` in a human‐readable format. | xref:BloombergLP/ball/CategoryManager_RadixTree/size.adoc[`size`] | Return the number of entries in this tree. | xref:BloombergLP/ball/CategoryManager_RadixTree/swap.adoc[`swap`] | Efficiently exchange the value of this object with that of `other`. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/ball/swap-09.adoc[BloombergLP::ball::swap]` | Exchange the values of the specified trees. | `xref:BloombergLP/ball/operator_eq-03f.adoc[BloombergLP::ball::operator==]` | Return `true` if the specified trees have the same value. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/operator_not_eq-0a7a.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` objects do not have the same value. | xref:BloombergLP/ball/operator_eq-05.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` objects have the same value. | xref:BloombergLP/ball/swap-06.adoc[`swap`] | Exchange the values of the specified `a` and `b` objects. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#