Fairport
v1.0.38
|
Contains references to subnode_leaf_blocks. More...
#include <node.h>
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_id & | get_key (uint pos) const |
Returns the key at the specified position. | |
subnode_block * | get_child (uint pos) |
Returns the child btree_node at the requested location. | |
const subnode_block * | 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. |
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.
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.
[in] | db | The database context |
[in] | info | Information about this block |
[in] | subblocks | Information about the child blocks |
fairport::subnode_block * fairport::subnode_nonleaf_block::get_child | ( | uint | i | ) | [inline, virtual] |
Returns the child btree_node at the requested location.
[in] | i | The position at which to get the child |
Implements fairport::btree_node_nonleaf< node_id, subnode_info >.
const fairport::subnode_block * fairport::subnode_nonleaf_block::get_child | ( | uint | i | ) | const [inline, virtual] |
Returns the child btree_node at the requested location.
[in] | i | The position at which to get the child |
Implements fairport::btree_node_nonleaf< node_id, subnode_info >.
Returns the key at the specified position.
This is specific to this btree_node, not the entire tree
[in] | pos | The position to retrieve the key for |
Implements fairport::btree_node< K, V >.
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
Implements fairport::btree_node< K, V >.