Fairport  v1.0.38
fairport::disk::bt_page< T, EntryType > Struct Template Reference

The fundamental page structure which forms the basis of the two BTrees. More...

#include <disk.h>

+ Inheritance diagram for fairport::disk::bt_page< T, EntryType >:
+ Collaboration diagram for fairport::disk::bt_page< T, EntryType >:

List of all members.

Public Attributes

union {
   EntryType   entries [max_entries]
   byte   _ignore [extra_space]
}; 
byte num_entries
 Number of entries on this page.
byte num_entries_max
 Maximum number of entries on this page.
byte entry_size
 The size of each entry.
byte level
 The level of this page. A level of zero indicates a leaf.
page_trailer< T > trailer
 The page trailer.

Static Public Attributes

static const size_t extra_space = page<T>::page_data_size - sizeof(T)
static const size_t max_entries = extra_space / sizeof(EntryType)
 Maximum number of entries on a page.

Detailed Description

template<typename T, typename EntryType>
struct fairport::disk::bt_page< T, EntryType >

The fundamental page structure which forms the basis of the two BTrees.

Generally speaking, the generic form of a BTree page contains a fixed array of entries, followed by metadata about those entries and the page. The entry type (and entry size, and thus the max number of entries) varies between NBT and BBT pages.

Template Parameters:
Tulonglong for a unicode store, ulong for an ANSI store
EntryTypeThe type of entry on this page. In practice either a bbt_leaf_entry, nbt_leaf_entry, or bt_entry
See also:
[MS-PST] 2.2.2.7.7.1

Definition at line 828 of file disk.h.


Member Data Documentation

union { ... }
template<typename T, typename EntryType>
byte fairport::disk::bt_page< T, EntryType >::_ignore[extra_space]

Definition at line 835 of file disk.h.

template<typename T, typename EntryType>
EntryType fairport::disk::bt_page< T, EntryType >::entries[max_entries]

Definition at line 834 of file disk.h.

template<typename T, typename EntryType>
byte fairport::disk::bt_page< T, EntryType >::entry_size

The size of each entry.

Definition at line 840 of file disk.h.

template<typename T, typename EntryType>
const size_t fairport::disk::bt_page< T, EntryType >::extra_space = page<T>::page_data_size - sizeof(T) [static]

Definition at line 830 of file disk.h.

template<typename T, typename EntryType>
byte fairport::disk::bt_page< T, EntryType >::level

The level of this page. A level of zero indicates a leaf.

Definition at line 841 of file disk.h.

template<typename T, typename EntryType>
const size_t fairport::disk::bt_page< T, EntryType >::max_entries = extra_space / sizeof(EntryType) [static]

Maximum number of entries on a page.

Definition at line 831 of file disk.h.

template<typename T, typename EntryType>
byte fairport::disk::bt_page< T, EntryType >::num_entries

Number of entries on this page.

Definition at line 838 of file disk.h.

template<typename T, typename EntryType>
byte fairport::disk::bt_page< T, EntryType >::num_entries_max

Maximum number of entries on this page.

Definition at line 839 of file disk.h.

template<typename T, typename EntryType>
page_trailer<T> fairport::disk::bt_page< T, EntryType >::trailer

The page trailer.

Definition at line 843 of file disk.h.


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