api/sortable-serialise.cc File Reference

Serialise floating point values to string which sort the same way. More...

#include <config.h>
#include <xapian/queryparser.h>
#include <float.h>
#include <math.h>
#include <string>
#include "omassert.h"

Include dependency graph for sortable-serialise.cc:

Go to the source code of this file.

Functions

string Xapian::sortable_serialise (double value)
 Convert a floating point number to a string, preserving sort order.
static unsigned char numfromstr (const std::string &str, std::string::size_type pos)
 Get a number from the character at a given position in a string, returning 0 if the string isn't long enough.
double Xapian::sortable_unserialise (const std::string &value)
 Convert a string encoded using sortable_serialise back to a floating point number.


Detailed Description

Serialise floating point values to string which sort the same way.

Definition in file sortable-serialise.cc.


Function Documentation

static unsigned char numfromstr ( const std::string &  str,
std::string::size_type  pos 
) [inline, static]

Get a number from the character at a given position in a string, returning 0 if the string isn't long enough.

Definition at line 170 of file sortable-serialise.cc.

Referenced by Xapian::sortable_unserialise().


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