xapian-core  1.4.27
Functions
length.cc File Reference

length encoded as a string More...

#include <config.h>
#include "length.h"
#include "noreturn.h"
#include "xapian/error.h"
+ Include dependency graph for length.cc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static void throw_network_error (const char *msg)
 
template<typename T >
static void decode_length_ (const char **p, const char *end, T &out)
 
template<typename T >
static void decode_length_and_check_ (const char **p, const char *end, T &out)
 
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.cc.

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

template<typename T >
static void decode_length_ ( const char **  p,
const char *  end,
T &  out 
)
inlinestatic

Definition at line 60 of file length.cc.

References throw_network_error().

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

◆ decode_length_and_check_()

template<typename T >
static void decode_length_and_check_ ( const char **  p,
const char *  end,
T &  out 
)
inlinestatic

Definition at line 85 of file length.cc.

References decode_length(), and throw_network_error().

Referenced by decode_length_and_check().

◆ throw_network_error()

static void throw_network_error ( const char *  msg)
static

Definition at line 34 of file length.cc.

Referenced by decode_length_(), and decode_length_and_check_().