mdds
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
mdds::trie::detail::iterator_base< _TrieType, IsConst > Class Template Reference

Public Types

using value_type = mdds::detail::ref_pair< typename std::add_const< key_type >::type, trie_value_type >
 
using pointer = value_type *
 
using reference = value_type &
 
using difference_type = std::ptrdiff_t
 
using iterator_category = std::bidirectional_iterator_tag
 

Public Member Functions

 iterator_base (node_stack_type &&node_stack, key_buffer_type &&buf, iterator_type type)
 
bool operator== (const iterator_base &other) const
 
bool operator!= (const iterator_base &other) const
 
value_type operator* ()
 
value_type operator-> ()
 
iterator_baseoperator++ ()
 
iterator_base operator++ (int)
 
iterator_baseoperator-- ()
 
iterator_base operator-- (int)
 

Protected Types

using trie_type = _TrieType
 
using _is_const = bool_constant< IsConst >
 
using node_stack_type = typename get_node_stack_type< trie_type, _is_const >::type
 
using trie_node_type = mdds::detail::const_t< typename trie_type::trie_node, IsConst >
 
using trie_node_child_pos_type = typename mdds::detail::get_iterator_type< typename std::remove_const< trie_node_type >::type::children_type, _is_const >::type
 
using key_traits_type = typename trie_type::key_traits_type
 
using key_type = typename key_traits_type::key_type
 
using key_buffer_type = typename key_traits_type::key_buffer_type
 
using trie_value_type = typename mdds::detail::const_or_not< typename trie_type::value_type, _is_const >::type
 

Protected Member Functions

 iterator_base (empty_iterator_type)
 

Static Protected Member Functions

static trie_node_type * push_child_node_to_stack (node_stack_type &node_stack, key_buffer_type &buf, trie_node_child_pos_type &child_pos)
 
static trie_node_type * descend_to_previus_leaf_node (node_stack_type &node_stack, key_buffer_type &buf)
 

Protected Attributes

friend trie_type
 
friend search_results< trie_type >
 
node_stack_type m_node_stack
 
key_buffer_type m_buffer
 
key_type m_current_key
 
trie_value_type * m_current_value_ptr
 
iterator_type m_type
 

Member Function Documentation

◆ descend_to_previus_leaf_node()

template<typename _TrieType , bool IsConst>
static trie_node_type * mdds::trie::detail::iterator_base< _TrieType, IsConst >::descend_to_previus_leaf_node ( node_stack_type &  node_stack,
key_buffer_type &  buf 
)
inlinestaticprotected

From the current node, move to its previous child node and descend all the way to the leaf node.