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

Contains references to other bth_node allocations. More...

#include <heap.h>

+ Inheritance diagram for pstsdk::bth_nonleaf_node< K, V >:
+ Collaboration diagram for pstsdk::bth_nonleaf_node< K, V >:

Public Member Functions

 bth_nonleaf_node (const heap_ptr &h, heap_id id, ushort level, std::vector< std::pair< K, heap_id > > bth_info)
 Construct a bth_nonleaf_node.
 
const K & get_key (uint pos) const
 Returns the key at the specified position.
 
bth_node< K, V > * get_child (uint pos)
 Returns the child btree_node at the requested location.
 
const bth_node< K, V > * get_child (uint pos) const
 Returns the child btree_node at the requested location.
 
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_nonleaf< K, V >
virtual ~btree_node_nonleaf ()
 
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_nonleaf< 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_nonleaf_node< K, V >

Contains references to other bth_node allocations.

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

Definition at line 361 of file heap.h.

Constructor & Destructor Documentation

◆ bth_nonleaf_node()

template<typename K , typename V >
pstsdk::bth_nonleaf_node< K, V >::bth_nonleaf_node ( const heap_ptr h,
heap_id  id,
ushort  level,
std::vector< std::pair< K, heap_id > >  bth_info 
)
inline

Construct a bth_nonleaf_node.

Parameters
[in]hThe heap to open out of
[in]idThe id to interpret as a non-leaf BTH node
[in]levelThe level of this bth_nonleaf_node (non-zero)
[in]bth_infoThe info about child bth_node allocations

Definition at line 372 of file heap.h.

Member Function Documentation

◆ get_child() [1/2]

template<typename K , typename V >
pstsdk::bth_node< K, V > * pstsdk::bth_nonleaf_node< K, V >::get_child ( uint  i)
inlinevirtual

Returns the child btree_node at the requested location.

Parameters
[in]iThe position at which to get the child
Returns
a non-owning pointer of the child btree_node

Implements pstsdk::btree_node_nonleaf< K, V >.

Definition at line 511 of file heap.h.

◆ get_child() [2/2]

template<typename K , typename V >
const pstsdk::bth_node< K, V > * pstsdk::bth_nonleaf_node< K, V >::get_child ( uint  i) const
inlinevirtual

Returns the child btree_node at the requested location.

Parameters
[in]iThe position at which to get the child
Returns
a non-owning pointer of the child btree_node

Implements pstsdk::btree_node_nonleaf< K, V >.

Definition at line 525 of file heap.h.

◆ get_key()

template<typename K , typename V >
const K & pstsdk::bth_nonleaf_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 379 of file heap.h.

◆ num_values()

template<typename K , typename V >
uint pstsdk::bth_nonleaf_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 382 of file heap.h.


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