BtreeCheck Class Reference

#include <flint_check.h>

Inheritance diagram for BtreeCheck:

Inheritance graph
[legend]
Collaboration diagram for BtreeCheck:

Collaboration graph
[legend]
List of all members.

Static Public Member Functions

static void check (const string &name, int opts, std::ostream &out=std::cout)
static void check (const string &name, int opts, std::ostream &out=std::cout)

Private Member Functions

 BtreeCheck (const std::string &name_, bool readonly, std::ostream &out_)
void block_check (Cursor_ *C_, int j, int opts)
int block_usage (const byte *p) const
void report_block (int m, int n, const byte *p) const
 BtreeCheck::report_block(m, n, p) prints the block at p, block number n, indented by m spaces.
void report_block_full (int m, int n, const byte *p) const
void report_cursor (int N, const Cursor_ *C_) const
 XAPIAN_NORETURN (void failure(int n) const)
void print_key (const byte *p, int c, int j) const
void print_tag (const byte *p, int c, int j) const
void print_spaces (int n) const
void print_bytes (int n, const byte *p) const
 BtreeCheck (const std::string &name_, bool readonly, std::ostream &out_)
void block_check (Cursor *C_, int j, int opts)
int block_usage (const byte *p) const
void report_block (int m, int n, const byte *p) const
void report_block_full (int m, int n, const byte *p) const
void report_cursor (int N, const Cursor *C_) const
void failure (int n) const
void print_key (const byte *p, int c, int j) const
void print_tag (const byte *p, int c, int j) const
void print_spaces (int n) const
void print_bytes (int n, const byte *p) const

Private Attributes

std::ostream & out
std::ostream & out

Detailed Description

Definition at line 32 of file flint_check.h.


Constructor & Destructor Documentation

BtreeCheck::BtreeCheck ( const std::string &  name_,
bool  readonly,
std::ostream &  out_ 
) [inline, private]

Definition at line 37 of file flint_check.h.

BtreeCheck::BtreeCheck ( const std::string &  name_,
bool  readonly,
std::ostream &  out_ 
) [inline, private]

Definition at line 36 of file btreecheck.h.


Member Function Documentation

static void BtreeCheck::check ( const string &  name,
int  opts,
std::ostream &  out = std::cout 
) [static]

Referenced by check_table().

void BtreeCheck::block_check ( Cursor_ C_,
int  j,
int  opts 
) [private]

Definition at line 134 of file flint_check.cc.

References FlintTable::base, FlintTable_base::block_free_at_start(), FlintTable_base::block_free_now(), FlintTable::block_given_by(), FlintTable::block_size, FlintTable::block_to_cursor(), D2, DIR_END, DIR_START, failure(), FlintTable_base::free_block(), GET_LEVEL, FlintTable::level, MAX_FREE, Cursor_::n, OPT_FULL_TREE, OPT_SHORT_TREE, Cursor_::p, report_block(), report_block_full(), REVISION, and TOTAL_FREE.

Referenced by block_check().

int BtreeCheck::block_usage ( const byte p  )  const [private]

Definition at line 98 of file flint_check.cc.

References FlintTable::block_size, DIR_END, and TOTAL_FREE.

Referenced by report_block(), and report_block_full().

void BtreeCheck::report_block ( int  m,
int  n,
const byte p 
) const [private]

BtreeCheck::report_block(m, n, p) prints the block at p, block number n, indented by m spaces.

Definition at line 108 of file flint_check.cc.

References block_usage(), D2, DIR_END, DIR_START, GET_LEVEL, out, print_key(), print_spaces(), and REVISION.

Referenced by block_check().

void BtreeCheck::report_block_full ( int  m,
int  n,
const byte p 
) const [private]

Definition at line 80 of file flint_check.cc.

References block_usage(), D2, DIR_END, DIR_START, GET_LEVEL, out, print_key(), print_spaces(), print_tag(), and REVISION.

Referenced by block_check().

void BtreeCheck::report_cursor ( int  N,
const Cursor_ C_ 
) const [private]

Definition at line 261 of file flint_check.cc.

References FlintTable::level.

BtreeCheck::XAPIAN_NORETURN ( void failure(int n)  const  )  [private]

void BtreeCheck::print_key ( const byte p,
int  c,
int  j 
) const [private]

Definition at line 50 of file flint_check.cc.

References Item_base_< T >::component_of(), Item_base_< T >::key(), Key_::length(), out, and Key_::read().

Referenced by report_block(), and report_block_full().

void BtreeCheck::print_tag ( const byte p,
int  c,
int  j 
) const [private]

Definition at line 67 of file flint_check.cc.

References Item_base_< T >::append_chunk(), Item_base_< T >::components_of(), getint4(), and out.

Referenced by report_block_full().

void BtreeCheck::print_spaces ( int  n  )  const [private]

Definition at line 40 of file flint_check.cc.

References out.

Referenced by report_block(), and report_block_full().

void BtreeCheck::print_bytes ( int  n,
const byte p 
) const [private]

Definition at line 45 of file flint_check.cc.

References out.

static void BtreeCheck::check ( const string &  name,
int  opts,
std::ostream &  out = std::cout 
) [static]

void BtreeCheck::block_check ( Cursor C_,
int  j,
int  opts 
) [private]

Definition at line 127 of file btreecheck.cc.

References FlintTable::base, block_check(), FlintTable_base::block_free_at_start(), FlintTable_base::block_free_now(), FlintTable::block_given_by(), FlintTable::block_size, FlintTable::block_to_cursor(), D2, DIR_END, DIR_START, failure(), FlintTable_base::free_block(), GET_LEVEL, FlintTable::level, MAX_FREE, Cursor::n, OPT_FULL_TREE, OPT_SHORT_TREE, Cursor::p, report_block(), report_block_full(), REVISION, and TOTAL_FREE.

int BtreeCheck::block_usage ( const byte p  )  const [private]

void BtreeCheck::report_block ( int  m,
int  n,
const byte p 
) const [private]

void BtreeCheck::report_block_full ( int  m,
int  n,
const byte p 
) const [private]

void BtreeCheck::report_cursor ( int  N,
const Cursor C_ 
) const [private]

Definition at line 254 of file btreecheck.cc.

References FlintTable::level.

void BtreeCheck::failure ( int  n  )  const [private]

Definition at line 127 of file flint_check.cc.

References out.

Referenced by block_check().

void BtreeCheck::print_key ( const byte p,
int  c,
int  j 
) const [private]

void BtreeCheck::print_tag ( const byte p,
int  c,
int  j 
) const [private]

void BtreeCheck::print_spaces ( int  n  )  const [private]

void BtreeCheck::print_bytes ( int  n,
const byte p 
) const [private]


Member Data Documentation

std::ostream& BtreeCheck::out [mutable, private]

Definition at line 52 of file flint_check.h.

Referenced by failure(), print_bytes(), print_key(), print_spaces(), print_tag(), report_block(), and report_block_full().

std::ostream& BtreeCheck::out [mutable, private]

Definition at line 51 of file btreecheck.h.


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.