|
PST File Format SDK v0.4
|
Contains the actual key value pairs of the BTH. More...
#include <heap.h>
Inheritance diagram for pstsdk::bth_leaf_node< K, V >:
Collaboration diagram for pstsdk::bth_leaf_node< K, V >:Public Member Functions | |
| bth_leaf_node (const heap_ptr &h, heap_id id, std::vector< std::pair< K, V > > data) | |
| Construct a bth_leaf_node. | |
| virtual | ~bth_leaf_node () |
| const V & | get_value (uint pos) const |
| Returns the value at the associated position on this leaf node. | |
| const K & | get_key (uint pos) const |
| Returns the key at the specified position. | |
| uint | num_values () const |
| Returns the number of entries in this btree_node. | |
Public Member Functions inherited from pstsdk::bth_node< K, V > | |
| bth_node (const heap_ptr &h, heap_id id, ushort level) | |
| Construct a bth_node object. | |
| virtual | ~bth_node () |
| heap_id | get_id () const |
| Return the heap_id of this bth_node. | |
| ushort | get_level () const |
| Return the leve of this bth_node. | |
| size_t | get_key_size () const |
| Return the key size of this bth. | |
| size_t | get_value_size () const |
| Return the value size of this bth. | |
| const heap_ptr | get_heap_ptr () const |
| Returns the heap this bth_node is in. | |
| heap_ptr | get_heap_ptr () |
| Returns the heap this bth_node is in. | |
| const node & | get_node () const |
| Get the node underlying this BTH. | |
| node & | get_node () |
| Get the node underlying this BTH. | |
Public Member Functions inherited from pstsdk::btree_node< K, V > | |
| virtual | ~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. | |
Public Member Functions inherited from pstsdk::btree_node_leaf< K, V > | |
| virtual | ~btree_node_leaf () |
| const V & | lookup (const K &key) const |
| Looks up the associated value for a given key. | |
Additional Inherited Members | |
Public Types inherited from pstsdk::btree_node< K, V > | |
| typedef const_btree_node_iter< K, V > | const_iterator |
Static Public Member Functions inherited from pstsdk::bth_node< K, V > | |
| static std::shared_ptr< bth_node< K, V > > | open_root (const heap_ptr &h, heap_id bth_root) |
| Opens a BTH node from the specified heap at the given root. | |
| static std::shared_ptr< bth_nonleaf_node< K, V > > | open_nonleaf (const heap_ptr &h, heap_id id, ushort level) |
| Open a non-leaf BTH node. | |
| static std::shared_ptr< bth_leaf_node< K, V > > | open_leaf (const heap_ptr &h, heap_id id) |
| Open a leaf BTH node. | |
Protected Member Functions inherited from pstsdk::btree_node_leaf< K, V > | |
| 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. | |
Protected Attributes inherited from pstsdk::bth_node< K, V > | |
| heap_ptr | m_heap |
Contains the actual key value pairs of the BTH.
| K | The key type for this BTH |
| V | The value type for this BTH |
|
inline |
Construct a bth_leaf_node.
| [in] | h | The heap to open out of |
| [in] | id | The id to interpret as a non-leaf BTH node |
| [in] | data | The key/value pairs stored in this leaf |
|
inlinevirtual |
|
inlinevirtual |
Returns the key at the specified position.
This is specific to this btree_node, not the entire tree
| [in] | pos | The position to retrieve the key for |
Implements pstsdk::btree_node< K, V >.
|
inlinevirtual |
Returns the value at the associated position on this leaf node.
| [in] | pos | The position to retrieve the value for |
Implements pstsdk::btree_node_leaf< K, V >.
|
inlinevirtual |
Returns the number of entries in this btree_node.
This is specific to this btree_node, not the entire tree
Implements pstsdk::btree_node< K, V >.