xapian-core  1.4.27
Functions
length.h File Reference

length encoded as a string More...

#include <string>
+ Include dependency graph for length.h:
+ This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

length encoded as a string

Definition in file length.h.

Function Documentation

◆ decode_length() [1/3]

void decode_length ( const char **  p,
const char *  end,
unsigned &  out 
)

Decode a length encoded by encode_length.

Parameters
pPointer to a pointer to the string, which will be advanced past the encoded length.
endPointer to the end of the string.
[out]outThe 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().

◆ decode_length() [2/3]

void decode_length ( const char **  p,
const char *  end,
unsigned long &  out 
)

Definition at line 100 of file length.cc.

References decode_length_().

◆ decode_length() [3/3]

void decode_length ( const char **  p,
const char *  end,
unsigned long long &  out 
)

Definition at line 106 of file length.cc.

References decode_length_().

◆ decode_length_and_check() [1/3]

void decode_length_and_check ( const char **  p,
const char *  end,
unsigned &  out 
)

◆ decode_length_and_check() [2/3]

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_().

◆ decode_length_and_check() [3/3]

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_().

◆ encode_length()

template<class T >
std::string encode_length ( len)

Encode a length as a variable-length string.

The encoding specifies its own length.

Parameters
lenThe length to encode.
Returns
The encoded length.

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().