MongoDB C++ Driver  legacy-1.1.2
coordinates.h
Go to the documentation of this file.
1 /* Copyright 2014 MongoDB Inc.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
18 #pragma once
19 
20 #include <vector>
21 
22 #include "mongo/client/export_macros.h"
23 #include "mongo/db/jsobj.h"
24 
25 namespace mongo {
26 namespace geo {
27 
28 class MONGO_CLIENT_API Coordinates {
29 public:
30  virtual ~Coordinates() {}
31 
37  virtual std::vector<double> getValues() const = 0;
38 
47  virtual BSONObj toBSON() const = 0;
48 
57  virtual double operator[](size_t dimension) const = 0;
58 };
59 
60 } // namespace geo
61 } // namespace mongo
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
BSON classes.
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