stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode Struct Reference

Inner node structure of the B-tree inner pages. More...

#include <stx-cbtreedb.h>

List of all members.

Public Member Functions

 InnerNode (uint16_t level_)
 Initializes structure with zero.
bool IsFull () const
 Returns true if no more keys can be added.
const key_typeLastKey () const
 Returns the currently last key in the node.

Public Attributes

uint16_t level
 level of this inner node, always > 0.
uint16_t slots
 number of used slots in the arrays.
uint32_t childrenoffset
 base offset of child B-tree nodes enumerated by keys.
union {
   key_type   keys [InnerNodeNumKeys]
 key array of ascending keys in this inner node.
   char   filler [BTreePageSize-InnerNodeHead]
 union with filler char array to assure page size.
}; 

Detailed Description

template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
struct stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode

Inner node structure of the B-tree inner pages.

Each inner node has n+1 children nodes, where n is the number of keys in the node. The n+1 children nodes are stored consecutively starting at childrenoffset.

Definition at line 264 of file stx-cbtreedb.h.


Constructor & Destructor Documentation

template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode::InnerNode ( uint16_t  level_  )  [inline, explicit]

Initializes structure with zero.

Definition at line 285 of file stx-cbtreedb.h.


Member Function Documentation

template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
bool stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode::IsFull (  )  const [inline]

Returns true if no more keys can be added.

Definition at line 292 of file stx-cbtreedb.h.

template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
const key_type& stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode::LastKey (  )  const [inline]

Returns the currently last key in the node.

Definition at line 298 of file stx-cbtreedb.h.


Member Data Documentation

union { ... }
template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
uint32_t stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode::childrenoffset

base offset of child B-tree nodes enumerated by keys.

Definition at line 273 of file stx-cbtreedb.h.

template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
char stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode::filler[BTreePageSize-InnerNodeHead]

union with filler char array to assure page size.

Definition at line 281 of file stx-cbtreedb.h.

template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
key_type stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode::keys[InnerNodeNumKeys]

key array of ascending keys in this inner node.

Definition at line 278 of file stx-cbtreedb.h.

template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
uint16_t stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode::level

level of this inner node, always > 0.

Definition at line 267 of file stx-cbtreedb.h.

template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
uint16_t stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode::slots

number of used slots in the arrays.

Definition at line 270 of file stx-cbtreedb.h.


The documentation for this struct was generated from the following file:
Generated on Wed Apr 14 13:43:41 2010 for stx-cbtreedb by  doxygen 1.6.3