Fairport  v1.0.38
fairport::subnode_nonleaf_block Class Reference

Contains references to subnode_leaf_blocks. More...

#include <node.h>

+ Inheritance diagram for fairport::subnode_nonleaf_block:
+ Collaboration diagram for fairport::subnode_nonleaf_block:

List of all members.

Public Member Functions

 subnode_nonleaf_block (const shared_db_ptr &db, const block_info &info, std::vector< std::pair< node_id, block_id > > subblocks)
 Construct a subnode_nonleaf_block from disk.
const node_idget_key (uint pos) const
 Returns the key at the specified position.
subnode_blockget_child (uint pos)
 Returns the child btree_node at the requested location.
const subnode_blockget_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.

Detailed Description

Contains references to subnode_leaf_blocks.

Because of the width of a subnode_leaf_block and the relative scarcity of subnodes, it's actually pretty uncommon to encounter a subnode non-leaf block in practice. But it does occur, typically on large tables.

This is the in memory version of one of these blocks. It forms the node of a tree, similar to the NBT, pointing to child blocks. There can only be one level of these - a subnode_nonleaf_block can not point to other subnode_nonleaf_blocks.

See also:
[MS-PST] 2.2.2.8.3.3.2

Definition at line 692 of file node.h.


Constructor & Destructor Documentation

fairport::subnode_nonleaf_block::subnode_nonleaf_block ( const shared_db_ptr db,
const block_info info,
std::vector< std::pair< node_id, block_id > >  subblocks 
) [inline]

Construct a subnode_nonleaf_block from disk.

Parameters:
[in]dbThe database context
[in]infoInformation about this block
[in]subblocksInformation about the child blocks

Definition at line 703 of file node.h.


Member Function Documentation

fairport::subnode_block * fairport::subnode_nonleaf_block::get_child ( uint  i) [inline, 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 fairport::btree_node_nonleaf< node_id, subnode_info >.

Definition at line 875 of file node.h.

const fairport::subnode_block * fairport::subnode_nonleaf_block::get_child ( uint  i) const [inline, 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 fairport::btree_node_nonleaf< node_id, subnode_info >.

Definition at line 885 of file node.h.

const node_id& fairport::subnode_nonleaf_block::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 711 of file node.h.

uint fairport::subnode_nonleaf_block::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 715 of file node.h.


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