MongoDB C++ Driver legacy-1.1.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mongo::geo::Coordinates Class Referenceabstract
+ Inheritance diagram for mongo::geo::Coordinates:

Public Member Functions

virtual std::vector< double > getValues () const =0
 Get the values of these coordinates as a vector of doubles.
 
virtual BSONObj toBSON () const =0
 Obtain a BSON representation of these coordinates.
 
virtual double operator[] (size_t dimension) const =0
 Obtain the value of these coordinates in a particular dimension.
 

Member Function Documentation

◆ getValues()

virtual std::vector< double > mongo::geo::Coordinates::getValues ( ) const
pure virtual

Get the values of these coordinates as a vector of doubles.

Returns
A vector<double> of the values of these coordinates.

Implemented in mongo::geo::Coordinates2D, and mongo::geo::Coordinates2DGeographic.

◆ operator[]()

virtual double mongo::geo::Coordinates::operator[] ( size_t  dimension) const
pure virtual

Obtain the value of these coordinates in a particular dimension.

Parameters
dimensionThe dimension whose coordinate value to return. 0 for x or longitude, 1 for y or latitude
Returns
The value of these coordinates in the given dimension.

Implemented in mongo::geo::Coordinates2D, and mongo::geo::Coordinates2DGeographic.

◆ toBSON()

virtual BSONObj mongo::geo::Coordinates::toBSON ( ) const
pure virtual

Obtain a BSON representation of these coordinates.

Example structure: { "coordinates" : [ value1, value2 ] }

Returns
a BSON representation of this point.

Implemented in mongo::geo::Coordinates2D, and mongo::geo::Coordinates2DGeographic.


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