23 #include "mongo/client/export_macros.h"
58 explicit Coordinates2D(
const std::pair<double, double>& coords);
92 virtual std::vector<double> getValues()
const;
100 std::pair<double, double> getValuesAsPair()
const;
108 virtual BSONObj toBSON()
const;
120 virtual double operator[](
size_t dimension)
const;
Coordinates2D(double x, double y)
Coordinates2D constructor.
Definition: coordinates2d.h:66
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
static size_t MONGO_CLIENT_FUNC dimensionality()
Get the dimensionality of this coordinate type.
Definition: coordinates2d.h:127
double getX() const
Get the x coordinate.
Definition: coordinates2d.h:73
Represents a 2D position (x, y).
Definition: coordinates2d.h:40
Definition: coordinates.h:28
C++ representation of a "BSON" object – that is, an extended JSON-style object in a binary represent...
Definition: bsonobj.h:78
double getY() const
Get the y coordinate.
Definition: coordinates2d.h:82