23 #include "mongo/base/string_data.h"
24 #include "mongo/client/export_macros.h"
28 #include "mongo/util/assert_util.h"
33 template <
typename TCoordinates>
57 virtual GeoObjType
getType()
const = 0;
63 template <
typename TCoordinates>
67 "bson must be a valid " + typeStr.toString() +
" type",
A StringData object wraps a 'const string&' or a 'const char*' without copying its contents...
Definition: string_data.h:43
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
BSONType type() const
Returns the type of the element.
Definition: bsonelement.h:154
BSONElement getField(const StringData &name) const
Get the field of the specified name.
std::string String() const
These functions, which start with a capital letter, throw a MsgAssertionException if the element is n...
Definition: bsonelement.h:62
virtual BSONObj toBSON() const =0
Obtain a BSON representation of this GeoObj.
bool eoo() const
Indicates if it is the end-of-object element, which is present at the end of every BSON object...
Definition: bsonelement.h:172
BSONElement represents an "element" in a BSONObj.
Definition: bsonelement.h:55
virtual BoundingBox< TCoordinates > getBoundingBox() const =0
Obtain the bounding box of this GeoObj.
C++ representation of a "BSON" object – that is, an extended JSON-style object in a binary represent...
Definition: bsonobj.h:78
virtual GeoObjType getType() const =0
Get the geometry type of this object.
Represents a bounding box.
Definition: boundingbox.h:67
character string, stored in utf8
Definition: bsontypes.h:46