xapian-core
1.4.27
|
#include <chert_table.h>
Public Member Functions | |
Key (const uint8_t *p_) | |
const uint8_t * | get_address () const |
void | read (std::string *key) const |
bool | operator== (Key key2) const |
bool | operator!= (Key key2) const |
bool | operator< (Key key2) const |
Compares this key with key2. More... | |
bool | operator>= (Key key2) const |
bool | operator> (Key key2) const |
bool | operator<= (Key key2) const |
int | length () const |
char | operator[] (size_t i) const |
Private Attributes | |
const uint8_t * | p |
Definition at line 167 of file chert_table.h.
|
inlineexplicit |
Definition at line 170 of file chert_table.h.
Referenced by Item_base< uint8_t *>::key().
|
inline |
Definition at line 171 of file chert_table.h.
References p.
Referenced by ChertTable::enter_key(), ChertTable::find_in_block(), and Item_wr::set_key_and_block().
|
inline |
Definition at line 181 of file chert_table.h.
References AssertRel, C2, getK(), and K1.
Referenced by ChertTable::enter_key(), operator<(), operator==(), operator[](), ChertTableCheck::print_key(), read(), and Item_wr::set_key_and_block().
|
inline |
Definition at line 176 of file chert_table.h.
References operator<().
bool Key::operator< | ( | Key | key2 | ) | const |
Compares this key with key2.
The result is true if this key precedes key2. The comparison is for byte sequence collating order, taking lengths into account. So if the keys are made up of lower case ASCII letters we get alphabetical ordering.
Now remember that items are added into the B-tree in fastest time when they are preordered by their keys. This is therefore the piece of code that needs to be followed to arrange for the preordering.
This is complicated by the fact that keys have two parts - a value and then a count. We first compare the values, and only if they are equal do we compare the counts.
Definition at line 2277 of file chert_table.cc.
References C2, K1, length(), LOGCALL, p, and RETURN.
Referenced by operator!=().
|
inline |
Definition at line 180 of file chert_table.h.
bool Key::operator== | ( | Key | key2 | ) | const |
|
inline |
Definition at line 179 of file chert_table.h.
|
inline |
Definition at line 178 of file chert_table.h.
|
inline |
Definition at line 185 of file chert_table.h.
|
inline |
Definition at line 172 of file chert_table.h.
References K1, length(), and operator==().
Referenced by ChertCursor::get_key(), and ChertTableCheck::print_key().
|
private |
Definition at line 168 of file chert_table.h.
Referenced by ChertTable::find(), Item_wr::form_key(), Item_wr::form_null_key(), get_address(), Item_base< uint8_t *>::get_address(), ChertTable::get_path(), operator<(), operator==(), Item_wr::set_block_given_by(), Item_wr::set_component_of(), Item_wr::set_components_of(), Item_wr::set_key_and_block(), Item_wr::set_key_len(), Item_wr::set_size(), and Item_wr::set_tag().