|
PST File Format SDK v0.4
|
Represents a leaf node in a BTree structure. More...
#include <btree.h>
Inheritance diagram for pstsdk::btree_node_leaf< K, V >:
Collaboration diagram for pstsdk::btree_node_leaf< K, V >:Public Member Functions | |
| virtual | ~btree_node_leaf () |
| const V & | lookup (const K &key) const |
| Looks up the associated value for a given key. | |
| virtual const V & | get_value (uint pos) const =0 |
| Returns the value at the associated position on this leaf node. | |
Public Member Functions inherited from pstsdk::btree_node< K, V > | |
| virtual | ~btree_node () |
| virtual const K & | get_key (uint pos) const =0 |
| Returns the key at the specified position. | |
| virtual uint | num_values () const =0 |
| Returns the number of entries in this btree_node. | |
| const_iterator | begin () const |
| Returns a STL style iterator positioned at the first entry. | |
| const_iterator | end () const |
| Returns a STL style iterator positioned at the "end" entry. | |
| int | binary_search (const K &key) const |
| Performs a binary search over the keys of this btree_node. | |
Protected Member Functions | |
| void | first (btree_iter_impl< K, V > &iter) const |
| Positions the iterator at the first element on this tree. | |
| void | last (btree_iter_impl< K, V > &iter) const |
| Positions the iterator at the "end" element. | |
| void | next (btree_iter_impl< K, V > &iter) const |
| Moves the iterator to the next element. | |
| void | prev (btree_iter_impl< K, V > &iter) const |
| Moves the iterator to the previous element. | |
Friends | |
| class | const_btree_node_iter< K, V > |
Additional Inherited Members | |
Public Types inherited from pstsdk::btree_node< K, V > | |
| typedef const_btree_node_iter< K, V > | const_iterator |
Represents a leaf node in a BTree structure.
Classes which model a leaf of a BTree structure inherit from this. They have a total of three simple virtual functions to implement:
| K | The key type. Must be LessThan comparable. |
| V | The value type |
|
inlinevirtual |
|
inlineprotectedvirtual |
Positions the iterator at the first element on this tree.
| [in,out] | iter | Iterator state class |
Implements pstsdk::btree_node< K, V >.
|
pure virtual |
Returns the value at the associated position on this leaf node.
| [in] | pos | The position to retrieve the value for |
Implemented in pstsdk::bth_leaf_node< K, V >, pstsdk::subnode_leaf_block, and pstsdk::bt_leaf_page< K, V >.
|
inlineprotectedvirtual |
Positions the iterator at the "end" element.
| [in,out] | iter | Iterator state class |
Implements pstsdk::btree_node< K, V >.
|
virtual |
Looks up the associated value for a given key.
| key_not_found<K> | if the requested key is not in this btree |
| [in] | key | The key to lookup |
Implements pstsdk::btree_node< K, V >.
|
protectedvirtual |
Moves the iterator to the next element.
| [in,out] | iter | Iterator state class |
Implements pstsdk::btree_node< K, V >.
|
protectedvirtual |
Moves the iterator to the previous element.
| [in,out] | iter | Iterator state class |
Implements pstsdk::btree_node< K, V >.
|
friend |