BDE 4.39.x Production Release
Loading...
Searching...
No Matches
ball::CategoryManager_RadixTree_ChildNodeGuard< t_VALUE > Class Template Reference

#include <ball_categorymanager_radixtree.h>

Detailed Description

template<class t_VALUE>
class ball::CategoryManager_RadixTree_ChildNodeGuard< t_VALUE >

RAII guard to remove a child node when an exception is thrown during value emplacement in a CategoryManager_RadixTree_Node. This guard ensures exception safety by automatically removing a newly created child node from its parent if the value construction throws an exception.

See ball_categorymanager_radixtree

Public Types

typedef CategoryManager_RadixTree_Node< t_VALUE > Node
 
typedef Node::Children::iterator ChildIterator
 

Public Member Functions

 CategoryManager_RadixTree_ChildNodeGuard (Node *parent, ChildIterator child)
 
 ~CategoryManager_RadixTree_ChildNodeGuard ()
 
void release ()
 

Member Typedef Documentation

◆ ChildIterator

template<class t_VALUE >
typedef Node::Children::iterator ball::CategoryManager_RadixTree_ChildNodeGuard< t_VALUE >::ChildIterator

◆ Node

template<class t_VALUE >
typedef CategoryManager_RadixTree_Node<t_VALUE> ball::CategoryManager_RadixTree_ChildNodeGuard< t_VALUE >::Node

Constructor & Destructor Documentation

◆ CategoryManager_RadixTree_ChildNodeGuard()

template<class t_VALUE >
ball::CategoryManager_RadixTree_ChildNodeGuard< t_VALUE >::CategoryManager_RadixTree_ChildNodeGuard ( Node parent,
ChildIterator  child 
)
inline

Create a guard managing the specified child iterator in the specified parent node. The guard will erase the child from the parent upon destruction unless release() is called.

◆ ~CategoryManager_RadixTree_ChildNodeGuard()

Destroy this guard. If release() has not been called, erase the child node from the parent (specified at construction).

Member Function Documentation

◆ release()

template<class t_VALUE >
void ball::CategoryManager_RadixTree_ChildNodeGuard< t_VALUE >::release ( )
inline

Release this guard, preventing the child node from being erased upon destruction. This method should be called after the value has been successfully emplaced in the child node.


The documentation for this class was generated from the following file: