[#BloombergLP-ball-CategoryManager_RadixTree_ChildNodeGuard]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::CategoryManager&lowbar;RadixTree&lowbar;ChildNodeGuard
:relfileprefix: ../../
:mrdocs:

RAII guard that removes a child node on exception during value emplacement&period;

== Synopsis

Declared in `&lt;ball&lowbar;categorymanager&lowbar;radixtree&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;VALUE&gt;
class CategoryManager&lowbar;RadixTree&lowbar;ChildNodeGuard;
----

== Description

This guard ensures exception safety by automatically removing a newly created child node from its parent if the value construction throws an exception&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/CategoryManager_RadixTree_ChildNodeGuard/ChildIterator.adoc[`ChildIterator`] 
| Iterator over the child nodes of a radix tree node&period;
| xref:BloombergLP/ball/CategoryManager_RadixTree_ChildNodeGuard/Node.adoc[`Node`] 
| `Node` is an alias for a node in the radix tree&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/CategoryManager_RadixTree_ChildNodeGuard/2constructor.adoc[`CategoryManager&lowbar;RadixTree&lowbar;ChildNodeGuard`]         [.small]#[constructor]#
| Create a guard managing the specified `child` in the specified `parent`&period;
| xref:BloombergLP/ball/CategoryManager_RadixTree_ChildNodeGuard/2destructor.adoc[`&#126;CategoryManager&lowbar;RadixTree&lowbar;ChildNodeGuard`] [.small]#[destructor]#
| Destroy this guard&period; If `release()` has not been called, erase the child node from the parent (specified at construction)&period;
| xref:BloombergLP/ball/CategoryManager_RadixTree_ChildNodeGuard/release.adoc[`release`] 
| Release this guard so the child is not erased on destruction&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
