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

Contains references to other bt_pages. More...

#include <page.h>

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

Public Member Functions

 bt_nonleaf_page (const shared_db_ptr &db, const page_info &pi, ushort level, std::vector< std::pair< K, page_info > > subpi)
 Construct a bt_nonleaf_page from disk.
 
const K & get_key (uint pos) const
 Returns the key at the specified position.
 
bt_page< K, V > * get_child (uint pos)
 Returns the child btree_node at the requested location.
 
const bt_page< 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::bt_page< K, V >
 bt_page (const shared_db_ptr &db, const page_info &pi, ushort level)
 Construct a bt_page from disk.
 
ushort get_level () const
 Returns the level of this bt_page.
 
- Public Member Functions inherited from pstsdk::page
 page (const shared_db_ptr &db, const page_info &pi)
 Construct a page from disk.
 
page_id get_page_id () const
 Get the page id.
 
ulonglong get_address () const
 Get the physical address of this page.
 
- 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
 
- Protected Member Functions inherited from pstsdk::page
shared_db_ptr get_db_ptr () const
 
- 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::page
weak_db_ptr m_db
 The database context we're a member of.
 
page_id m_pid
 Page id.
 
ulonglong m_address
 Address of this page.
 

Detailed Description

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

Contains references to other bt_pages.

A bt_nonleaf_page makes up the body of the NBT and BBT (which differ only at the leaf).

Template Parameters
Kkey type
Vvalue type
See also
[MS-PST] 2.2.2.7.7.2

Definition at line 119 of file page.h.

Constructor & Destructor Documentation

◆ bt_nonleaf_page()

template<typename K , typename V >
pstsdk::bt_nonleaf_page< K, V >::bt_nonleaf_page ( const shared_db_ptr db,
const page_info pi,
ushort  level,
std::vector< std::pair< K, page_info > >  subpi 
)
inline

Construct a bt_nonleaf_page from disk.

Parameters
[in]dbThe database context
[in]piInformation about this page
[in]levelDistance from leaf
[in]subpiInformation about the child pages

Definition at line 131 of file page.h.

Member Function Documentation

◆ get_child() [1/2]

template<typename K , typename V >
bt_page< K, V > * pstsdk::bt_nonleaf_page< K, V >::get_child ( uint  i)
virtual

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 >.

◆ get_child() [2/2]

template<typename K , typename V >
const bt_page< K, V > * pstsdk::bt_nonleaf_page< K, V >::get_child ( uint  i) const
virtual

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 >.

◆ get_key()

template<typename K , typename V >
const K & pstsdk::bt_nonleaf_page< 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 139 of file page.h.

◆ num_values()

template<typename K , typename V >
uint pstsdk::bt_nonleaf_page< 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 142 of file page.h.


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