PST File Format SDK v0.4
Loading...
Searching...
No Matches
pstsdk::bth_leaf_node< K, V > Class Template Reference

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 nodeget_node () const
 Get the node underlying this BTH.
 
nodeget_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
 

Detailed Description

template<typename K, typename V>
class pstsdk::bth_leaf_node< K, V >

Contains the actual key value pairs of the BTH.

Template Parameters
KThe key type for this BTH
VThe value type for this BTH
See also
[MS-PST] 2.3.2.3

Definition at line 395 of file heap.h.

Constructor & Destructor Documentation

◆ bth_leaf_node()

template<typename K , typename V >
pstsdk::bth_leaf_node< K, V >::bth_leaf_node ( const heap_ptr h,
heap_id  id,
std::vector< std::pair< K, V > >  data 
)
inline

Construct a bth_leaf_node.

Parameters
[in]hThe heap to open out of
[in]idThe id to interpret as a non-leaf BTH node
[in]dataThe key/value pairs stored in this leaf

Definition at line 405 of file heap.h.

◆ ~bth_leaf_node()

template<typename K , typename V >
virtual pstsdk::bth_leaf_node< K, V >::~bth_leaf_node ( )
inlinevirtual

Definition at line 412 of file heap.h.

Member Function Documentation

◆ get_key()

template<typename K , typename V >
const K & pstsdk::bth_leaf_node< K, V >::get_key ( uint  pos) const
inlinevirtual

Returns the key at the specified position.

This is specific to this btree_node, not the entire tree

Parameters
[in]posThe position to retrieve the key for
Returns
The key at the requested position

Implements pstsdk::btree_node< K, V >.

Definition at line 417 of file heap.h.

◆ get_value()

template<typename K , typename V >
const V & pstsdk::bth_leaf_node< K, V >::get_value ( uint  pos) const
inlinevirtual

Returns the value at the associated position on this leaf node.

Parameters
[in]posThe position to retrieve the value for
Returns
The value at the requested position

Implements pstsdk::btree_node_leaf< K, V >.

Definition at line 415 of file heap.h.

◆ num_values()

template<typename K , typename V >
uint pstsdk::bth_leaf_node< K, V >::num_values ( ) const
inlinevirtual

Returns the number of entries in this btree_node.

This is specific to this btree_node, not the entire tree

Returns
The number of keys in this btree_node

Implements pstsdk::btree_node< K, V >.

Definition at line 419 of file heap.h.


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