common/serialise-double.h File Reference

#include <xapian/visibility.h>
#include <string>

Include dependency graph for serialise-double.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string serialise_double (double v)
 Serialise a double to a string.
double unserialise_double (const char **p, const char *end)
 Unserialise a double serialised by serialise_double.


Function Documentation

std::string serialise_double ( double  v  ) 

Serialise a double to a string.

Parameters:
v The double to serialise.
Returns:
Serialisation of v.

Definition at line 75 of file serialise-double.cc.

References Assert, and base256ify_double().

Referenced by check_double_serialisation(), RemoteServer::RemoteServer(), Xapian::BM25Weight::serialise(), ScaleWeight::serialise(), Xapian::TradWeight::serialise(), serialise_mset(), serialise_mset_pre_30_5(), serialise_stats(), Xapian::Query::Internal::set_dbl_parameter(), and RemoteDatabase::set_query().

double unserialise_double ( const char **  p,
const char *  end 
)

Unserialise a double serialised by serialise_double.

Parameters:
p Pointer to a pointer to the string, which will be advanced past the serialised double.
end Pointer to the end of the string.
Returns:
The unserialised double.

Definition at line 134 of file serialise-double.cc.

References base256ify_double().

Referenced by check_double_serialisation(), Xapian::Query::Internal::get_dbl_parameter(), RemoteDatabase::get_doclength(), NetworkPostList::next(), RemoteDatabase::open_term_list(), QUnserial::readcompound(), RemoteDatabase::RemoteDatabase(), ScaleWeight::unserialise(), unserialise_mset(), unserialise_stats(), and RemoteDatabase::update_stats().


Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.