Fairport  v1.0.38
fairport::bt_leaf_page< K, V > Class Template Reference

Contains the actual key value pairs of the btree. More...

#include <page.h>

+ Inheritance diagram for fairport::bt_leaf_page< K, V >:
+ Collaboration diagram for fairport::bt_leaf_page< K, V >:

List of all members.

Public Member Functions

 bt_leaf_page (const shared_db_ptr &db, const page_info &pi, std::vector< std::pair< K, V > > data)
 Construct a leaf page from disk.
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.

Detailed Description

template<typename K, typename V>
class fairport::bt_leaf_page< K, V >

Contains the actual key value pairs of the btree.

Template Parameters:
Kkey type
Vvalue type

Definition at line 154 of file page.h.


Constructor & Destructor Documentation

template<typename K , typename V >
fairport::bt_leaf_page< K, V >::bt_leaf_page ( const shared_db_ptr db,
const page_info pi,
std::vector< std::pair< K, V > >  data 
) [inline]

Construct a leaf page from disk.

Parameters:
[in]dbThe database context
[in]piInformation about this page
[in]dataThe key/value pairs on this leaf page

Definition at line 165 of file page.h.


Member Function Documentation

template<typename K , typename V >
const K& fairport::bt_leaf_page< K, V >::get_key ( uint  pos) const [inline, virtual]

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 fairport::btree_node< K, V >.

Definition at line 175 of file page.h.

template<typename K , typename V >
const V& fairport::bt_leaf_page< K, V >::get_value ( uint  pos) const [inline, virtual]

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 fairport::btree_node_leaf< K, V >.

Definition at line 173 of file page.h.

template<typename K , typename V >
uint fairport::bt_leaf_page< K, V >::num_values ( ) const [inline, virtual]

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 fairport::btree_node< K, V >.

Definition at line 177 of file page.h.


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