tlx
BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::reverse_iterator Class Reference

STL-like mutable 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 value_typereference
 Reference to the value_type. STL required. More...
 
typedef 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 reverse_iterator self
 Our own type. More...
 

Public Member Functions

 reverse_iterator ()
 Default-Constructor of a reverse iterator. More...
 
 reverse_iterator (typename BTree::LeafNode *l, unsigned short s)
 Initializing-Constructor of a mutable reverse iterator. More...
 
 reverse_iterator (const iterator &it)
 Copy-constructor from a mutable 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...
 
reverse_iteratoroperator++ ()
 Prefix++ advance the iterator to the next slot. More...
 
reverse_iterator operator++ (int)
 Postfix++ advance the iterator to the next slot. More...
 
reverse_iteratoroperator-- ()
 Prefix– backstep the iterator to the last slot. More...
 
reverse_iterator operator-- (int)
 Postfix– backstep the iterator to the last slot. More...
 
bool operator== (const reverse_iterator &x) const
 Equality of iterators. More...
 
bool operator!= (const reverse_iterator &x) const
 Inequality of iterators. More...
 

Private Attributes

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 iterator
 Friendly to the const_iterator, so it may access the two data items directly. More...
 
class const_iterator
 Also friendly to the const_iterator, so it may access the two data items directly. More...
 
class const_reverse_iterator
 Also 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 >::reverse_iterator

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

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

Definition at line 680 of file btree.hpp.

Member Typedef Documentation

typedef ptrdiff_t difference_type

STL-magic.

Definition at line 701 of file btree.hpp.

typedef std::bidirectional_iterator_tag iterator_category

STL-magic iterator category.

Definition at line 698 of file btree.hpp.

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

Definition at line 686 of file btree.hpp.

typedef value_type* pointer

Pointer to the value_type. STL required.

Definition at line 695 of file btree.hpp.

Reference to the value_type. STL required.

Definition at line 692 of file btree.hpp.

Our own type.

Definition at line 704 of file btree.hpp.

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

Definition at line 689 of file btree.hpp.

Constructor & Destructor Documentation

reverse_iterator ( )
inline

Default-Constructor of a reverse iterator.

Definition at line 736 of file btree.hpp.

reverse_iterator ( typename BTree::LeafNode l,
unsigned short  s 
)
inline

Initializing-Constructor of a mutable reverse iterator.

Definition at line 741 of file btree.hpp.

reverse_iterator ( const iterator it)
inline

Copy-constructor from a mutable iterator.

Definition at line 746 of file btree.hpp.

Member Function Documentation

const key_type& key ( ) const
inline

Key of the current slot.

Definition at line 763 of file btree.hpp.

bool operator!= ( const reverse_iterator x) const
inline

Inequality of iterators.

Definition at line 846 of file btree.hpp.

reference operator* ( ) const
inline

Dereference the iterator.

Definition at line 751 of file btree.hpp.

reverse_iterator& operator++ ( )
inline

Prefix++ advance the iterator to the next slot.

Definition at line 769 of file btree.hpp.

reverse_iterator operator++ ( int  )
inline

Postfix++ advance the iterator to the next slot.

Definition at line 786 of file btree.hpp.

reverse_iterator& operator-- ( )
inline

Prefix– backstep the iterator to the last slot.

Definition at line 805 of file btree.hpp.

reverse_iterator operator-- ( int  )
inline

Postfix– backstep the iterator to the last slot.

Definition at line 822 of file btree.hpp.

pointer operator-> ( ) const
inline

Dereference the iterator.

Definition at line 757 of file btree.hpp.

bool operator== ( const reverse_iterator x) const
inline

Equality of iterators.

Definition at line 841 of file btree.hpp.

Friends And Related Function Documentation

friend class const_iterator
friend

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

Definition at line 721 of file btree.hpp.

friend class const_reverse_iterator
friend

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

Definition at line 725 of file btree.hpp.

friend class iterator
friend

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

Definition at line 717 of file btree.hpp.

Member Data Documentation

BTree::LeafNode* curr_leaf
private

The currently referenced leaf node of the tree.

Definition at line 710 of file btree.hpp.

unsigned short curr_slot
private

One slot past the current key/data slot referenced.

Definition at line 713 of file btree.hpp.

TLX_BTREE_FRIENDS
private

Definition at line 730 of file btree.hpp.


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