xapian-core
1.4.26
|
length encoded as a string More...
#include <string>
Go to the source code of this file.
Functions | |
template<class T > | |
std::string | encode_length (T len) |
Encode a length as a variable-length string. More... | |
void | decode_length (const char **p, const char *end, unsigned &out) |
Decode a length encoded by encode_length. More... | |
void | decode_length (const char **p, const char *end, unsigned long &out) |
void | decode_length (const char **p, const char *end, unsigned long long &out) |
void | decode_length_and_check (const char **p, const char *end, unsigned &out) |
Decode a length encoded by encode_length. More... | |
void | decode_length_and_check (const char **p, const char *end, unsigned long &out) |
void | decode_length_and_check (const char **p, const char *end, unsigned long long &out) |
length encoded as a string
Definition in file length.h.
void decode_length | ( | const char ** | p, |
const char * | end, | ||
unsigned & | out | ||
) |
Decode a length encoded by encode_length.
p | Pointer to a pointer to the string, which will be advanced past the encoded length. | |
end | Pointer to the end of the string. | |
[out] | out | The decoded length. |
Definition at line 94 of file length.cc.
References decode_length_().
Referenced by RemoteDatabase::add_document(), decode_length_and_check_(), encode_length(), RemoteDatabase::get_doclength(), RemoteDatabase::get_freqs(), RemoteDatabase::get_unique_terms(), Xapian::ValueCountMatchSpy::merge_results(), RemoteServer::msg_addspelling_(), RemoteServer::msg_deletedocument(), RemoteServer::msg_doclength(), RemoteServer::msg_document(), RemoteServer::msg_positionlist(), RemoteServer::msg_query(), RemoteServer::msg_removespelling(), RemoteServer::msg_replacedocument_(), RemoteServer::msg_termlist(), RemoteServer::msg_uniqueterms(), RemoteServer::msg_valuestats(), RemoteServer::msg_writeaccess(), NetworkPostList::next(), RemoteDatabase::open_allterms(), RemoteDatabase::open_document(), RemoteDatabase::open_position_list(), RemoteDatabase::open_term_list(), RemoteDatabase::read_post_list(), RemoteDatabase::read_value_stats(), RemoteDatabase::replace_document(), test_serialiselength1(), Xapian::ValueCountMatchSpy::unserialise(), Xapian::ValueWeightPostingSource::unserialise(), Xapian::DecreasingValueWeightPostingSource::unserialise(), Xapian::ValueMapPostingSource::unserialise(), Xapian::Query::Internal::unserialise(), unserialise_document(), unserialise_mset(), unserialise_rset(), unserialise_stats(), Xapian::LatLongDistancePostingSource::unserialise_with_registry(), and RemoteDatabase::update_stats().
void decode_length | ( | const char ** | p, |
const char * | end, | ||
unsigned long & | out | ||
) |
Definition at line 100 of file length.cc.
References decode_length_().
void decode_length | ( | const char ** | p, |
const char * | end, | ||
unsigned long long & | out | ||
) |
Definition at line 106 of file length.cc.
References decode_length_().
void decode_length_and_check | ( | const char ** | p, |
const char * | end, | ||
unsigned & | out | ||
) |
Decode a length encoded by encode_length.
Also checks the result against the amount of data remaining after the length has been decoded.
p | Pointer to a pointer to the string, which will be advanced past the encoded length. | |
end | Pointer to the end of the string. | |
[out] | out | The decoded length. |
Definition at line 112 of file length.cc.
References decode_length_and_check_().
Referenced by Xapian::DatabaseReplica::Internal::apply_db_copy(), encode_length(), RemoteDatabase::get_mset(), Xapian::ValueCountMatchSpy::merge_results(), RemoteServer::msg_query(), RemoteServer::msg_replacedocumentterm(), RemoteServer::msg_setmetadata_(), VectorTermList::next(), RemoteDatabase::read_value_stats(), test_serialiselength2(), Xapian::ValueMapPostingSource::unserialise(), Xapian::Query::Internal::unserialise(), unserialise_document(), unserialise_error(), unserialise_mset(), unserialise_stats(), Xapian::LatLongDistancePostingSource::unserialise_with_registry(), and Xapian::DatabaseMaster::write_changesets_to_fd().
void decode_length_and_check | ( | const char ** | p, |
const char * | end, | ||
unsigned long & | out | ||
) |
Definition at line 118 of file length.cc.
References decode_length_and_check_().
void decode_length_and_check | ( | const char ** | p, |
const char * | end, | ||
unsigned long long & | out | ||
) |
Definition at line 124 of file length.cc.
References decode_length_and_check_().
std::string encode_length | ( | T | len | ) |
Encode a length as a variable-length string.
The encoding specifies its own length.
len | The length to encode. |
Definition at line 36 of file length.h.
References decode_length(), and decode_length_and_check().
Referenced by RemoteDatabase::add_spelling(), RemoteDatabase::delete_document(), RemoteDatabase::get_doclength(), Xapian::DatabaseReplica::Internal::get_revision_info(), RemoteDatabase::get_unique_terms(), RemoteServer::msg_adddocument(), RemoteServer::msg_allterms(), RemoteServer::msg_collfreq(), RemoteServer::msg_doclength(), RemoteServer::msg_document(), RemoteServer::msg_freqs(), RemoteServer::msg_positionlist(), RemoteServer::msg_postlist(), RemoteServer::msg_query(), RemoteServer::msg_replacedocumentterm(), RemoteServer::msg_termfreq(), RemoteServer::msg_termlist(), RemoteServer::msg_uniqueterms(), RemoteServer::msg_update(), RemoteServer::msg_valuestats(), RemoteDatabase::open_document(), RemoteDatabase::open_position_list(), RemoteDatabase::open_term_list(), RemoteDatabase::read_value_stats(), RemoteDatabase::RemoteDatabase(), RemoteDatabase::remove_spelling(), RemoteDatabase::replace_document(), RemoteConnection::send_file(), RemoteDatabase::send_global_stats(), RemoteConnection::send_message(), GlassDatabase::send_whole_database(), ChertDatabase::send_whole_database(), Xapian::Internal::QueryTerm::serialise(), Xapian::Internal::QueryPostingSource::serialise(), Xapian::Internal::QueryValueRange::serialise(), Xapian::Internal::QueryValueLE::serialise(), Xapian::Internal::QueryValueGE::serialise(), Xapian::ValueCountMatchSpy::serialise(), Xapian::Internal::QueryWildcard::serialise(), Xapian::LatLongDistancePostingSource::serialise(), Xapian::ValueWeightPostingSource::serialise(), Xapian::DecreasingValueWeightPostingSource::serialise(), Xapian::ValueMapPostingSource::serialise(), Xapian::Internal::QueryBranch::serialise_(), serialise_document(), serialise_error(), serialise_mset(), Xapian::ValueCountMatchSpy::serialise_results(), serialise_rset(), serialise_stats(), RemoteDatabase::set_metadata(), RemoteDatabase::set_query(), test_serialiselength1(), test_serialiselength2(), and VectorTermList::VectorTermList().