#include <flint_check.h>


Static Public Member Functions | |
| static void | check (const char *tablename, const std::string &path, int opts, std::ostream &out=std::cout) |
Private Member Functions | |
| BtreeCheck (const char *tablename_, const std::string &path_, 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 |
Private Attributes | |
| std::ostream & | out |
Definition at line 33 of file flint_check.h.
| BtreeCheck::BtreeCheck | ( | const char * | tablename_, | |
| const std::string & | path_, | |||
| bool | readonly, | |||
| std::ostream & | out_ | |||
| ) | [inline, private] |
Definition at line 38 of file flint_check.h.
| void BtreeCheck::block_check | ( | Cursor_ * | C_, | |
| int | j, | |||
| int | opts | |||
| ) | [private] |
Definition at line 133 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(), Cursor_::c, D2, DIR_END, DIR_START, FlintTable_base::free_block(), Item_base_< T >::get_address(), GET_LEVEL, Item_base_< T >::key(), FlintTable::level, MAX_FREE, Cursor_::n, OPT_FULL_TREE, OPT_SHORT_TREE, Cursor_::p, report_block(), report_block_full(), REVISION, Item_base_< T >::size(), and TOTAL_FREE.
Referenced by check().
| int BtreeCheck::block_usage | ( | const byte * | p | ) | const [private] |
Definition at line 97 of file flint_check.cc.
References FlintTable::block_size, DIR_END, and TOTAL_FREE.
Referenced by report_block(), and report_block_full().
| void BtreeCheck::check | ( | const char * | tablename, | |
| const std::string & | path, | |||
| int | opts, | |||
| std::ostream & | out = std::cout | |||
| ) | [static] |
Definition at line 207 of file flint_check.cc.
References FlintTable::base, FlintTable::base_letter, block_check(), FlintTable_base::block_free_at_start(), FlintTable::block_size, FlintTable::C, FlintTable::faked_root_block, FlintTable_base::get_bit_map_size(), FlintTable_base::get_last_block(), FlintTable_base::is_empty(), FlintTable::item_count, FlintTable::level, Cursor_::n, FlintTable::open(), OPT_SHOW_BITMAP, OPT_SHOW_STATS, and FlintTable::revision_number.
Referenced by check_flint_table().
| void BtreeCheck::print_bytes | ( | int | n, | |
| const byte * | p | |||
| ) | const [private] |
| void BtreeCheck::print_key | ( | const byte * | p, | |
| int | c, | |||
| int | j | |||
| ) | const [private] |
Definition at line 49 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_spaces | ( | int | n | ) | const [private] |
Definition at line 39 of file flint_check.cc.
References out.
Referenced by report_block(), and report_block_full().
| void BtreeCheck::print_tag | ( | const byte * | p, | |
| int | c, | |||
| int | j | |||
| ) | const [private] |
Definition at line 66 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::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 107 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 79 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] |
| BtreeCheck::XAPIAN_NORETURN | ( | void failure(int n) | const | ) | [private] |
std::ostream& BtreeCheck::out [private] |
Definition at line 54 of file flint_check.h.
Referenced by print_bytes(), print_key(), print_spaces(), print_tag(), report_block(), report_block_full(), and report_cursor().