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

Signature page which heads all cbtreedb files. More...

#include <stx-cbtreedb.h>

List of all members.

Public Attributes

char signature [8]
 "cbtreedb" or custom string
uint32_t header_crc32
 CRC32 of following bytes.
uint32_t version
 0x00010000
uint32_t app_version_id
 custom id defined by template
uint32_t items
 key-value pairs in db
uint32_t key_size
 sizeof(key_type)
uint64_t btree_offset
 b-tree offset in file
uint64_t btree_size
 b-tree total size in bytes
uint64_t btree_firstleaf
 offset of first leaf in file
uint32_t btree_pagesize
 size of b-tree nodes
uint32_t btree_levels
 number of levels in tree
uint32_t btree_leaves
 number of leaf nodes in tree
uint8_t btree_sha256 [32]
 SHA256 digest of all tree nodes.
uint64_t value_offset
 file offset of value data area
uint64_t value_size
 total size of value data area
uint8_t value_sha256 [32]
 SHA256 digest of all value data.

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 >::SignaturePage

Signature page which heads all cbtreedb files.

It contains a signature and many important fields to correctly access the database file. Due to disk page alignment reasons, the signature block is stored with a full B-tree page size.

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


Member Data Documentation

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 >::SignaturePage::app_version_id

custom id defined by template

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

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

offset of first leaf in file

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

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 >::SignaturePage::btree_leaves

number of leaf nodes in tree

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

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 >::SignaturePage::btree_levels

number of levels in tree

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

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

b-tree offset in file

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

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 >::SignaturePage::btree_pagesize

size of b-tree nodes

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

template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
uint8_t stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::SignaturePage::btree_sha256[32]

SHA256 digest of all tree nodes.

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

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

b-tree total size in bytes

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

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 >::SignaturePage::header_crc32

CRC32 of following bytes.

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

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 >::SignaturePage::items

key-value pairs in db

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

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 >::SignaturePage::key_size

sizeof(key_type)

Definition at line 173 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 >::SignaturePage::signature[8]

"cbtreedb" or custom string

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

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

file offset of value data area

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

template<typename _Key = uint32_t, typename _Compare = std::less<_Key>, unsigned int _BTreePageSize = 1024, uint32_t _AppVersionId = 0>
uint8_t stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::SignaturePage::value_sha256[32]

SHA256 digest of all value data.

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

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

total size of value data area

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

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 >::SignaturePage::version

0x00010000

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


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