include/stx-cbtreedb.h File Reference

Contains all classes of the constant B-tree database implementation. More...

#include <string.h>
#include <stdint.h>
#include <stdexcept>
#include <vector>
#include <map>
#include <iostream>
Include dependency graph for stx-cbtreedb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  stx::STATIC_ASSERTION_FAILURE< true >
struct  stx::static_assert_test< x >
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >
 Template super-class enclosing all classes which can operate on a constant B-tree database file. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::Exception
 Our own exception class derived from std::runtime_error. More...
struct  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::SignaturePage
 Signature page which heads all cbtreedb files. More...
struct  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::LeafNode
 Leaf node structure of the B-tree leaf pages. More...
struct  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::InnerNode
 Inner node structure of the B-tree inner pages. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::CRC32
 CRC32 Cyclic redundancy check implementation class. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::SHA256
 SHA-256 Message Digest implementation class. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::BTreePage
 BTreePage is a reference-counted buffer holding one page of the B-tree index. More...
struct  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::BTreePage::Impl
 Implementation of BTreePage: holds the data buffer and a reference counter. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::PageCacheImpl
 PageCache and PageCacheImpl implement a LRU-strategy cache of B-tree pages used by CBTreeDB reader objects. More...
struct  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::PageCacheImpl::HashCell
 Structure for each slot in the cache hash array. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::PageCache
 PageCache and PageCacheImpl implement a LRU-strategy cache of B-tree pages used by CBTreeDB reader objects. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::ReaderImpl
 Implementation class used to read constant B-tree database files. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::Reader
 Class used to read constant B-tree database files. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::BTreeBuilder
 BTreeBuilder is used to construct an index very similar to a B-tree from an ordered sequence. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::Writer
 Writer is used to construct an constant B-tree database from an unsorted input sequence. More...
class  stx::CBTreeDB< _Key, _Compare, _BTreePageSize, _AppVersionId >::WriterSequential
 WriterSequential is used to construct a constant B-tree database from an _ordered_ input sequence. More...

Namespaces

namespace  stx
 

STX - Some Template Extensions namespace.


Defines

#define STX_MACRO_JOIN(X, Y)   STX_MACRO_DO_JOIN(X,Y)
#define STX_MACRO_DO_JOIN(X, Y)   STX_MACRO_DO_JOIN2(X,Y)
#define STX_MACRO_DO_JOIN2(X, Y)   X##Y
#define STX_STATIC_ASSERT(A)
#define CBTREEDB_ASSERT(x)   do { if (!(x)) throw(Exception("Assertion failed: " #x)); } while(0)
 Instead of assert() we use this macro to throw exceptions.
#define CBTREEDB_CHECK(x, msg)   do { if (!(x)) throw(Exception(msg)); } while(0)
 Short macro to throw exceptions if a program logic expression fails.

Detailed Description

Contains all classes of the constant B-tree database implementation.

Definition in file stx-cbtreedb.h.


Define Documentation

#define CBTREEDB_ASSERT (  )     do { if (!(x)) throw(Exception("Assertion failed: " #x)); } while(0)

Instead of assert() we use this macro to throw exceptions.

These could be disabled for production releases.

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

#define CBTREEDB_CHECK ( x,
msg   )     do { if (!(x)) throw(Exception(msg)); } while(0)

Short macro to throw exceptions if a program logic expression fails.

These must not be disabled in production releases as they may depend on user input.

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

#define STX_MACRO_DO_JOIN ( X,
 )     STX_MACRO_DO_JOIN2(X,Y)

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

#define STX_MACRO_DO_JOIN2 ( X,
 )     X##Y

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

#define STX_MACRO_JOIN ( X,
 )     STX_MACRO_DO_JOIN(X,Y)

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

#define STX_STATIC_ASSERT (  ) 
Value:
typedef static_assert_test<sizeof(STATIC_ASSERTION_FAILURE< static_cast<bool>(A) >)> \
        STX_MACRO_JOIN(static_assert_typedef_, __LINE__)

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

Generated on Wed Apr 14 13:43:40 2010 for stx-cbtreedb by  doxygen 1.6.3