Bridges-C++  3.4.5-dev1-6-g935685a
Bridges(C++ API)
AmenityData.h
Go to the documentation of this file.
1 #ifndef OSM_AMENITY_DATA
2 
3 #define OSM_AMENITY_DATA
4 
5 #include "Amenities.h"
6 #include <vector>
7 
22 class AmenityData {
23 
24  private:
25 
26  // vector to hold amenity data, that will be returned
27  // by the query
28  vector<Amenities> data;
29 
30  // location information - lat/long bounding box
31  double minLat;
32  double minLon;
33  double maxLat;
34  double maxLon;
35 
36  // number of amenities
37  int count;
38 
39  public:
40 
45  data.clear();
46  minLat = 0;
47  minLon = 0;
48  maxLat = 0;
49  maxLon = 0;
50  count = 0;
51  }
52 
64  AmenityData(vector<Amenities> amenities, double minLat, double minLon,
65  double maxLat, double maxLon, int count) {
66  data = amenities;
67  setMinLat(minLat);
68  setMinLon(minLon);
69  setMaxLat(maxLat);
70  setMaxLon(maxLon);
71  setCount(count);
72  }
73 
78  vector<Amenities> getAmenities() {
79  return data;
80  }
81 
86  void addAmenities(Amenities amenity) {
87  data.push_back(amenity);
88  }
89 
95  double getMinLat() {
96  return minLat;
97  }
98 
103  void setMinLat(double lat) {
104  minLat = lat;
105  }
106 
111  double getMinLon() {
112  return minLon;
113  }
114 
119  void setMinLon(double longitude) {
120  minLon = longitude;
121  }
127  double getMaxLat() {
128  return maxLat;
129  }
130 
135  void setMaxLat(double lat) {
136  maxLat = lat;
137  }
138 
143  double getMaxLon() {
144  return maxLon;
145  }
146 
151  void setMaxLon(double longitude) {
152  maxLon = longitude;
153  }
154 
159  int getCount() {
160  return count;
161  }
162 
167  void setCount(int c) {
168  count = c;
169  }
170 };
171 
172 #endif
Class that holds Open Street Map Amenity Data.
Definition: AmenityData.h:22
void addAmenities(Amenities amenity)
Definition: AmenityData.h:86
double getMaxLat()
Definition: AmenityData.h:127
void setMaxLat(double lat)
Definition: AmenityData.h:135
void setMinLon(double longitude)
Definition: AmenityData.h:119
double getMaxLon()
Definition: AmenityData.h:143
void setMinLat(double lat)
Definition: AmenityData.h:103
void setMaxLon(double longitude)
Definition: AmenityData.h:151
vector< Amenities > getAmenities()
Definition: AmenityData.h:78
double getMinLat()
Definition: AmenityData.h:95
AmenityData(vector< Amenities > amenities, double minLat, double minLon, double maxLat, double maxLon, int count)
Definition: AmenityData.h:64
int getCount()
Definition: AmenityData.h:159
AmenityData()
Definition: AmenityData.h:44
double getMinLon()
Definition: AmenityData.h:111
void setCount(int c)
Definition: AmenityData.h:167