PMDK C++ bindings  1.11.1
This is the C++ bindings documentation for PMDK's libpmemobj.
Public Member Functions | List of all members
pmem::obj::experimental::radix_tree< Key, Value, BytesView >::radix_tree_iterator< IsConst > Struct Template Reference

Radix tree iterator supports multipass and bidirectional iteration. More...

#include <libpmemobj++/experimental/radix_tree.hpp>

Public Member Functions

template<typename V = Value, typename Enable = typename std::enable_if< detail::is_inline_string<V>::value>::type>
void assign_val (basic_string_view< typename V::value_type, typename V::traits_type > rhs)
 Handles assignment to the value. More...
 
template<typename T , typename V = Value, typename Enable = typename std::enable_if< !detail::is_inline_string<V>::value>::type>
void assign_val (T &&rhs)
 Assign value to leaf pointed by the iterator. More...
 

Detailed Description

template<typename Key, typename Value, typename BytesView = detail::bytes_view<Key>>
template<bool IsConst>
struct pmem::obj::experimental::radix_tree< Key, Value, BytesView >::radix_tree_iterator< IsConst >

Radix tree iterator supports multipass and bidirectional iteration.

If Value type is inline_string, calling (*it).second = "new_value" might cause reallocation and invalidate iterators to that element.

Member Function Documentation

◆ assign_val() [1/2]

template<typename Key , typename Value , typename BytesView >
template<bool IsConst>
template<typename V , typename Enable >
void pmem::obj::experimental::radix_tree< Key, Value, BytesView >::radix_tree_iterator< IsConst >::assign_val ( basic_string_view< typename V::value_type, typename V::traits_type >  rhs)

Handles assignment to the value.

If there is enough capacity old content is overwritten (with a help of undo log). Otherwise a new leaf is allocated and the old one is freed.

If reallocation happens, all other iterators to this element are invalidated.

This function is useful when value_type is inline_string.

◆ assign_val() [2/2]

template<typename Key , typename Value , typename BytesView >
template<bool IsConst>
template<typename T , typename V , typename Enable >
void pmem::obj::experimental::radix_tree< Key, Value, BytesView >::radix_tree_iterator< IsConst >::assign_val ( T &&  rhs)

Assign value to leaf pointed by the iterator.

This function is transactional


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