tlx
|
STL-like 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_type & | reference |
Reference to the value_type. STL required. More... | |
typedef value_type * | pointer |
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 iterator | self |
Our own type. 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... | |
reference | operator* () const |
Dereference the iterator. More... | |
pointer | operator-> () const |
Dereference the iterator. More... | |
const key_type & | key () const |
Key of the current slot. 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... | |
bool | operator== (const iterator &x) const |
Equality of iterators. More... | |
bool | operator!= (const iterator &x) const |
Inequality 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... | |
TLX_BTREE_FRIENDS | |
Friends | |
class | const_iterator |
Friendly to the const_iterator, so it may access the two data items directly. More... | |
class | reverse_iterator |
Also friendly to the reverse_iterator, so it may access the two data items directly. More... | |
class | const_reverse_iterator |
Also friendly to the const_reverse_iterator, so it may access the two data items directly. More... | |
class | BTree< key_type, value_type, key_of_value, key_compare, traits, allow_duplicates, allocator_type > |
Also friendly to the base btree class, because erase_iter() needs to read the curr_leaf and curr_slot values directly. More... | |
STL-like iterator object for B+ tree items.
The iterator points to a specific slot number in a leaf.
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 |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
Friendly to the const_iterator, so it may access the two data items directly.
|
friend |
Also friendly to the const_reverse_iterator, so it may access the two data items directly.
|
friend |
Also friendly to the reverse_iterator, so it may access the two data items directly.
|
private |
|
private |