tlx
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(). More...
 
typedef BTree::value_type value_type
 The value type of the btree. Returned by operator*(). More...
 
typedef const value_typereference
 Reference to the value_type. STL required. More...
 
typedef const value_typepointer
 Pointer to the value_type. STL required. More...
 
typedef std::bidirectional_iterator_tag iterator_category
 STL-magic iterator category. More...
 
typedef ptrdiff_t difference_type
 STL-magic. More...
 
typedef const_reverse_iterator self
 Our own type. More...
 

Public Member Functions

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

Private Attributes

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

Friends

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

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

typedef ptrdiff_t difference_type

STL-magic.

Definition at line 874 of file btree.hpp.

typedef std::bidirectional_iterator_tag iterator_category

STL-magic iterator category.

Definition at line 871 of file btree.hpp.

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

Definition at line 859 of file btree.hpp.

typedef const value_type* pointer

Pointer to the value_type. STL required.

Definition at line 868 of file btree.hpp.

typedef const value_type& reference

Reference to the value_type. STL required.

Definition at line 865 of file btree.hpp.

Our own type.

Definition at line 877 of file btree.hpp.

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

Definition at line 862 of file btree.hpp.

Constructor & Destructor Documentation

Default-Constructor of a const reverse iterator.

Definition at line 901 of file btree.hpp.

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 ( const iterator it)
inline

Copy-constructor from a mutable iterator.

Definition at line 912 of file btree.hpp.

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 ( const reverse_iterator it)
inline

Copy-constructor from a mutable reverse iterator.

Definition at line 922 of file btree.hpp.

Member Function Documentation

const key_type& key ( ) const
inline

Key of the current slot.

Definition at line 939 of file btree.hpp.

bool operator!= ( const const_reverse_iterator x) const
inline

Inequality of iterators.

Definition at line 1022 of file btree.hpp.

reference operator* ( ) const
inline

Dereference the iterator.

Definition at line 927 of file btree.hpp.

const_reverse_iterator& operator++ ( )
inline

Prefix++ advance the iterator to the previous slot.

Definition at line 945 of file btree.hpp.

const_reverse_iterator operator++ ( int  )
inline

Postfix++ advance the iterator to the previous slot.

Definition at line 962 of file btree.hpp.

const_reverse_iterator& operator-- ( )
inline

Prefix– backstep the iterator to the next slot.

Definition at line 981 of file btree.hpp.

const_reverse_iterator operator-- ( int  )
inline

Postfix– backstep the iterator to the next slot.

Definition at line 998 of file btree.hpp.

pointer operator-> ( ) const
inline

Dereference the iterator.

Definition at line 933 of file btree.hpp.

bool operator== ( const const_reverse_iterator x) const
inline

Equality of iterators.

Definition at line 1017 of file btree.hpp.

Friends And Related Function Documentation

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

const BTree::LeafNode* curr_leaf
private

The currently referenced leaf node of the tree.

Definition at line 883 of file btree.hpp.

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
private

Definition at line 895 of file btree.hpp.


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