tlx
Loading...
Searching...
No Matches
BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_reverse_iterator Class Reference

STL-like read-only reverse iterator object for B+ tree items. More...

#include <btree.hpp>

Public Types

typedef BTree::key_type key_type
 The key type of the btree. Returned by key().
 
typedef BTree::value_type value_type
 The value type of the btree. Returned by operator*().
 
typedef const value_typereference
 Reference to the value_type. STL required.
 
typedef const value_typepointer
 Pointer to the value_type. STL required.
 
typedef std::bidirectional_iterator_tag iterator_category
 STL-magic iterator category.
 
typedef ptrdiff_t difference_type
 STL-magic.
 
typedef const_reverse_iterator self
 Our own type.
 

Public Member Functions

 const_reverse_iterator ()
 Default-Constructor of a const reverse iterator.
 
 const_reverse_iterator (const typename BTree::LeafNode *l, unsigned short s)
 Initializing-Constructor of a const reverse iterator.
 
 const_reverse_iterator (const iterator &it)
 Copy-constructor from a mutable iterator.
 
 const_reverse_iterator (const const_iterator &it)
 Copy-constructor from a const iterator.
 
 const_reverse_iterator (const reverse_iterator &it)
 Copy-constructor from a mutable reverse iterator.
 
reference operator* () const
 Dereference the iterator.
 
pointer operator-> () const
 Dereference the iterator.
 
const key_typekey () const
 Key of the current slot.
 
const_reverse_iteratoroperator++ ()
 Prefix++ advance the iterator to the previous slot.
 
const_reverse_iterator operator++ (int)
 Postfix++ advance the iterator to the previous slot.
 
const_reverse_iteratoroperator-- ()
 Prefix– backstep the iterator to the next slot.
 
const_reverse_iterator operator-- (int)
 Postfix– backstep the iterator to the next slot.
 
bool operator== (const const_reverse_iterator &x) const
 Equality of iterators.
 
bool operator!= (const const_reverse_iterator &x) const
 Inequality of iterators.
 

Private Attributes

const BTree::LeafNodecurr_leaf
 The currently referenced leaf node of the tree.
 
unsigned short curr_slot
 One slot past the current key/data slot referenced.
 
 TLX_BTREE_FRIENDS
 

Friends

class reverse_iterator
 Friendly to the const_iterator, so it may access the two data items directly.
 

Detailed Description

template<typename Key, typename Value, typename KeyOfValue, typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
class tlx::BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::const_reverse_iterator

STL-like read-only reverse iterator object for B+ tree items.

The iterator points to a specific slot number in a leaf.

Definition at line 853 of file btree.hpp.

Member Typedef Documentation

◆ difference_type

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
ptrdiff_t difference_type

STL-magic.

Definition at line 874 of file btree.hpp.

◆ iterator_category

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
std::bidirectional_iterator_tag iterator_category

STL-magic iterator category.

Definition at line 871 of file btree.hpp.

◆ key_type

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
BTree::key_type key_type

The key type of the btree. Returned by key().

Definition at line 859 of file btree.hpp.

◆ pointer

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const value_type* pointer

Pointer to the value_type. STL required.

Definition at line 868 of file btree.hpp.

◆ reference

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const value_type& reference

Reference to the value_type. STL required.

Definition at line 865 of file btree.hpp.

◆ self

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const_reverse_iterator self

Our own type.

Definition at line 877 of file btree.hpp.

◆ value_type

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
BTree::value_type value_type

The value type of the btree. Returned by operator*().

Definition at line 862 of file btree.hpp.

Constructor & Destructor Documentation

◆ const_reverse_iterator() [1/5]

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const_reverse_iterator ( )
inline

Default-Constructor of a const reverse iterator.

Definition at line 901 of file btree.hpp.

◆ const_reverse_iterator() [2/5]

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const_reverse_iterator ( const typename BTree::LeafNode * l,
unsigned short s )
inline

Initializing-Constructor of a const reverse iterator.

Definition at line 906 of file btree.hpp.

◆ const_reverse_iterator() [3/5]

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const_reverse_iterator ( const iterator & it)
inline

Copy-constructor from a mutable iterator.

Definition at line 912 of file btree.hpp.

◆ const_reverse_iterator() [4/5]

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const_reverse_iterator ( const const_iterator & it)
inline

Copy-constructor from a const iterator.

Definition at line 917 of file btree.hpp.

◆ const_reverse_iterator() [5/5]

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const_reverse_iterator ( const reverse_iterator & it)
inline

Copy-constructor from a mutable reverse iterator.

Definition at line 922 of file btree.hpp.

Member Function Documentation

◆ key()

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const key_type & key ( ) const
inline

Key of the current slot.

Definition at line 939 of file btree.hpp.

◆ operator!=()

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
bool operator!= ( const const_reverse_iterator & x) const
inline

Inequality of iterators.

Definition at line 1022 of file btree.hpp.

◆ operator*()

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
reference operator* ( ) const
inline

Dereference the iterator.

Definition at line 927 of file btree.hpp.

◆ operator++() [1/2]

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const_reverse_iterator & operator++ ( )
inline

Prefix++ advance the iterator to the previous slot.

Definition at line 945 of file btree.hpp.

◆ operator++() [2/2]

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const_reverse_iterator operator++ ( int )
inline

Postfix++ advance the iterator to the previous slot.

Definition at line 962 of file btree.hpp.

◆ operator--() [1/2]

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const_reverse_iterator & operator-- ( )
inline

Prefix– backstep the iterator to the next slot.

Definition at line 981 of file btree.hpp.

◆ operator--() [2/2]

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const_reverse_iterator operator-- ( int )
inline

Postfix– backstep the iterator to the next slot.

Definition at line 998 of file btree.hpp.

◆ operator->()

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
pointer operator-> ( ) const
inline

Dereference the iterator.

Definition at line 933 of file btree.hpp.

◆ operator==()

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
bool operator== ( const const_reverse_iterator & x) const
inline

Equality of iterators.

Definition at line 1017 of file btree.hpp.

Friends And Related Symbol Documentation

◆ reverse_iterator

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
friend class reverse_iterator
friend

Friendly to the const_iterator, so it may access the two data items directly.

Definition at line 890 of file btree.hpp.

Member Data Documentation

◆ curr_leaf

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
const BTree::LeafNode* curr_leaf
private

The currently referenced leaf node of the tree.

Definition at line 883 of file btree.hpp.

◆ curr_slot

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
unsigned short curr_slot
private

One slot past the current key/data slot referenced.

Definition at line 886 of file btree.hpp.

◆ TLX_BTREE_FRIENDS

template<typename Key , typename Value , typename KeyOfValue , typename Compare = std::less<Key>, typename Traits = btree_default_traits<Key, Value>, bool Duplicates = false, typename Allocator = std::allocator<Value>>
TLX_BTREE_FRIENDS
private

Definition at line 895 of file btree.hpp.


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