xapian-core  1.4.25
Public Member Functions | Private Attributes | List of all members
Xapian::LatLongCoords Class Reference

A sequence of latitude-longitude coordinates. More...

#include <geospatial.h>

+ Collaboration diagram for Xapian::LatLongCoords:

Public Member Functions

LatLongCoordsIterator begin () const
 Get a begin iterator for the coordinates. More...
 
LatLongCoordsIterator end () const
 Get an end iterator for the coordinates. More...
 
size_t size () const
 Get the number of coordinates in the container. More...
 
bool empty () const
 Return true if and only if there are no coordinates in the container. More...
 
void append (const LatLongCoord &coord)
 Append a coordinate to the end of the sequence. More...
 
 LatLongCoords ()
 Construct an empty container. More...
 
 LatLongCoords (const LatLongCoord &coord)
 Construct a container holding one coordinate. More...
 
void unserialise (const std::string &serialised)
 Unserialise a string and set this object to the coordinates in it. More...
 
std::string serialise () const
 Return a serialised form of the coordinate list. More...
 
std::string get_description () const
 Return a string describing this object. More...
 

Private Attributes

std::vector< LatLongCoordcoords
 The coordinates. More...
 

Detailed Description

A sequence of latitude-longitude coordinates.

Experimental - see https://xapian.org/docs/deprecation#experimental-features

Definition at line 232 of file geospatial.h.

Constructor & Destructor Documentation

◆ LatLongCoords() [1/2]

Xapian::LatLongCoords::LatLongCoords ( )
inline

Construct an empty container.

Definition at line 266 of file geospatial.h.

◆ LatLongCoords() [2/2]

Xapian::LatLongCoords::LatLongCoords ( const LatLongCoord coord)
inline

Construct a container holding one coordinate.

Definition at line 269 of file geospatial.h.

Member Function Documentation

◆ append()

void Xapian::LatLongCoords::append ( const LatLongCoord coord)
inline

Append a coordinate to the end of the sequence.

Definition at line 260 of file geospatial.h.

Referenced by DEFINE_TESTCASE(), and Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker().

◆ begin()

LatLongCoordsIterator Xapian::LatLongCoords::begin ( ) const
inline

Get a begin iterator for the coordinates.

Definition at line 238 of file geospatial.h.

Referenced by DEFINE_TESTCASE(), and Xapian::LatLongMetric::operator()().

◆ empty()

bool Xapian::LatLongCoords::empty ( ) const
inline

Return true if and only if there are no coordinates in the container.

Definition at line 254 of file geospatial.h.

Referenced by DEFINE_TESTCASE(), and Xapian::LatLongMetric::operator()().

◆ end()

LatLongCoordsIterator Xapian::LatLongCoords::end ( ) const
inline

Get an end iterator for the coordinates.

Definition at line 243 of file geospatial.h.

Referenced by DEFINE_TESTCASE(), and Xapian::LatLongMetric::operator()().

◆ get_description()

string LatLongCoords::get_description ( ) const

Return a string describing this object.

Definition at line 118 of file latlongcoord.cc.

References Xapian::Internal::str().

Referenced by DEFINE_TESTCASE().

◆ serialise()

string LatLongCoords::serialise ( ) const

Return a serialised form of the coordinate list.

Definition at line 106 of file latlongcoord.cc.

References GeoEncode::encode().

Referenced by DEFINE_TESTCASE(), and Xapian::LatLongDistancePostingSource::serialise().

◆ size()

size_t Xapian::LatLongCoords::size ( ) const
inline

Get the number of coordinates in the container.

Definition at line 248 of file geospatial.h.

Referenced by DEFINE_TESTCASE(), and Xapian::LatLongMetric::operator()().

◆ unserialise()

void LatLongCoords::unserialise ( const std::string &  serialised)

Unserialise a string and set this object to the coordinates in it.

Parameters
serialisedthe string to unserialise the coordinates from.
Exceptions
Xapian::SerialisationErrorif the string does not contain a valid serialised latitude-longitude pair, or contains junk at the end of it.

Definition at line 94 of file latlongcoord.cc.

Referenced by Xapian::LatLongDistanceKeyMaker::operator()(), and Xapian::LatLongDistancePostingSource::unserialise_with_registry().

Member Data Documentation

◆ coords

std::vector<LatLongCoord> Xapian::LatLongCoords::coords
private

The coordinates.

Definition at line 234 of file geospatial.h.


The documentation for this class was generated from the following files: