Thrill
0.1
|
STL-like iterator object for B+ tree items. The iterator points to a specific slot number in a leaf.
#include <btree.hpp>
Public Types | |
typedef ptrdiff_t | difference_type |
STL-magic. More... | |
typedef std::bidirectional_iterator_tag | iterator_category |
STL-magic iterator category. More... | |
typedef BTree::key_type | key_type |
The key type of the btree. Returned by key(). More... | |
typedef value_type * | pointer |
Pointer to the value_type. STL required. More... | |
typedef value_type & | reference |
Reference to the value_type. STL required. More... | |
typedef iterator | self |
Our own type. More... | |
typedef BTree::value_type | value_type |
The value type of the btree. Returned by operator*(). More... | |
Public Member Functions | |
iterator () | |
Default-Constructor of a mutable iterator. More... | |
iterator (typename BTree::LeafNode *l, unsigned short s) | |
Initializing-Constructor of a mutable iterator. More... | |
iterator (const reverse_iterator &it) | |
Copy-constructor from a reverse iterator. More... | |
const key_type & | key () const |
Key of the current slot. More... | |
bool | operator!= (const iterator &x) const |
Inequality of iterators. More... | |
reference | operator* () const |
Dereference the iterator. More... | |
iterator & | operator++ () |
Prefix++ advance the iterator to the next slot. More... | |
iterator | operator++ (int) |
Postfix++ advance the iterator to the next slot. More... | |
iterator & | operator-- () |
Prefix– backstep the iterator to the last slot. More... | |
iterator | operator-- (int) |
Postfix– backstep the iterator to the last slot. More... | |
pointer | operator-> () const |
Dereference the iterator. More... | |
bool | operator== (const iterator &x) const |
Equality of iterators. More... | |
Private Attributes | |
BTree::LeafNode * | curr_leaf |
The currently referenced leaf node of the tree. More... | |
unsigned short | curr_slot |
Current key/data slot referenced. More... | |
typedef ptrdiff_t difference_type |
typedef std::bidirectional_iterator_tag iterator_category |
typedef BTree::key_type key_type |
typedef value_type* pointer |
typedef value_type& reference |
typedef BTree::value_type value_type |
The value type of the btree. Returned by operator*().
|
inline |
|
inline |
|
inline |
|
inline |
Key of the current slot.
Definition at line 419 of file btree.hpp.
References BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::LeafNode::key().
|
inline |
Inequality of iterators.
Definition at line 501 of file btree.hpp.
References BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::curr_leaf, and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::curr_slot.
|
inline |
Dereference the iterator.
Definition at line 409 of file btree.hpp.
References BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::LeafNode::slotdata.
|
inline |
Prefix++ advance the iterator to the next slot.
Definition at line 424 of file btree.hpp.
References BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::LeafNode::next_leaf, and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::node::slotuse.
|
inline |
Postfix++ advance the iterator to the next slot.
Definition at line 441 of file btree.hpp.
References BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::LeafNode::next_leaf, and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::node::slotuse.
|
inline |
Prefix– backstep the iterator to the last slot.
Definition at line 460 of file btree.hpp.
References BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::LeafNode::prev_leaf, and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::node::slotuse.
|
inline |
Postfix– backstep the iterator to the last slot.
Definition at line 477 of file btree.hpp.
References BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::LeafNode::prev_leaf, and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::node::slotuse.
|
inline |
Dereference the iterator.
Definition at line 414 of file btree.hpp.
References BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::LeafNode::slotdata.
|
inline |
Equality of iterators.
Definition at line 496 of file btree.hpp.
References BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::curr_leaf, and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::curr_slot.
|
private |
The currently referenced leaf node of the tree.
Definition at line 363 of file btree.hpp.
Referenced by BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::operator!=(), and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::operator==().
|
private |
Current key/data slot referenced.
Definition at line 366 of file btree.hpp.
Referenced by BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::operator!=(), and BTree< Key, Value, KeyOfValue, Compare, Traits, Duplicates, Allocator >::iterator::operator==().