#include <chert_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 | |
| ChertTableCheck (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 |
| ChertTableCheck::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 chert_check.h.
| ChertTableCheck::ChertTableCheck | ( | const char * | tablename_, | |
| const std::string & | path_, | |||
| bool | readonly, | |||
| std::ostream & | out_ | |||
| ) | [inline, private] |
Definition at line 38 of file chert_check.h.
| void ChertTableCheck::block_check | ( | Cursor * | C_, | |
| int | j, | |||
| int | opts | |||
| ) | [private] |
Definition at line 126 of file chert_check.cc.
References ChertTable::base, ChertTable_base::block_free_at_start(), ChertTable_base::block_free_now(), ChertTable::block_given_by(), ChertTable::block_size, ChertTable::block_to_cursor(), Cursor::c, D2, DIR_END, DIR_START, ChertTable_base::free_block(), Item_base< T >::get_address(), GET_LEVEL, Item_base< T >::key(), ChertTable::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 ChertTableCheck::block_usage | ( | const byte * | p | ) | const [private] |
Definition at line 90 of file chert_check.cc.
References ChertTable::block_size, DIR_END, and TOTAL_FREE.
Referenced by report_block(), and report_block_full().
| void ChertTableCheck::check | ( | const char * | tablename, | |
| const std::string & | path, | |||
| int | opts, | |||
| std::ostream & | out = std::cout | |||
| ) | [static] |
Definition at line 200 of file chert_check.cc.
References ChertTable::base, ChertTable::base_letter, block_check(), ChertTable_base::block_free_at_start(), ChertTable::block_size, ChertTable::C, ChertTable::faked_root_block, ChertTable_base::get_bit_map_size(), ChertTable_base::get_last_block(), ChertTable_base::is_empty(), ChertTable::item_count, ChertTable::level, Cursor::n, ChertTable::open(), OPT_SHOW_BITMAP, OPT_SHOW_STATS, and ChertTable::revision_number.
Referenced by check_chert_table().
| void ChertTableCheck::print_bytes | ( | int | n, | |
| const byte * | p | |||
| ) | const [private] |
| void ChertTableCheck::print_key | ( | const byte * | p, | |
| int | c, | |||
| int | j | |||
| ) | const [private] |
Definition at line 42 of file chert_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 ChertTableCheck::print_spaces | ( | int | n | ) | const [private] |
Definition at line 32 of file chert_check.cc.
References out.
Referenced by report_block(), and report_block_full().
| void ChertTableCheck::print_tag | ( | const byte * | p, | |
| int | c, | |||
| int | j | |||
| ) | const [private] |
Definition at line 59 of file chert_check.cc.
References Item_base< T >::append_chunk(), Item_base< T >::components_of(), getint4(), and out.
Referenced by report_block_full().
| void ChertTableCheck::report_block | ( | int | m, | |
| int | n, | |||
| const byte * | p | |||
| ) | const [private] |
ChertTableCheck::report_block(m, n, p) prints the block at p, block number n, indented by m spaces.
Definition at line 100 of file chert_check.cc.
References block_usage(), D2, DIR_END, DIR_START, GET_LEVEL, out, print_key(), print_spaces(), and REVISION.
Referenced by block_check().
| void ChertTableCheck::report_block_full | ( | int | m, | |
| int | n, | |||
| const byte * | p | |||
| ) | const [private] |
Definition at line 72 of file chert_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 ChertTableCheck::report_cursor | ( | int | N, | |
| const Cursor * | C_ | |||
| ) | const [private] |
| ChertTableCheck::XAPIAN_NORETURN | ( | void failure(int n) | const | ) | [private] |
std::ostream& ChertTableCheck::out [private] |
Definition at line 54 of file chert_check.h.
Referenced by print_bytes(), print_key(), print_spaces(), print_tag(), report_block(), report_block_full(), and report_cursor().