Refactoring _Coordinate class

This commit is contained in:
Dennis Luxen
2013-08-14 13:12:28 +02:00
parent 916387748c
commit 4748bca8a4
21 changed files with 113 additions and 92 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ public:
virtual const std::string & GetDescriptor() const = 0;
virtual void HandleRequest(const RouteParameters & routeParameters, http::Reply& reply) = 0;
inline bool checkCoord(const _Coordinate & c) {
inline bool checkCoord(const FixedPointCoordinate & c) {
if(
c.lat > 90*COORDINATE_PRECISION ||
c.lat < -90*COORDINATE_PRECISION ||
+1 -1
View File
@@ -48,7 +48,7 @@ public:
}
//query to helpdesk
_Coordinate result;
FixedPointCoordinate result;
std::string tmp;
//json
+1 -1
View File
@@ -35,7 +35,7 @@ struct RawRouteData {
std::vector< _PathData > computedShortestPath;
std::vector< _PathData > computedAlternativePath;
std::vector< PhantomNodes > segmentEndCoordinates;
std::vector< _Coordinate > rawViaNodeCoordinates;
std::vector< FixedPointCoordinate > rawViaNodeCoordinates;
unsigned checkSum;
int lengthOfShortestPath;
int lengthOfAlternativePath;
+2 -2
View File
@@ -52,7 +52,7 @@ struct RouteParameters {
std::string jsonpParameter;
std::string language;
std::vector<std::string> hints;
std::vector<_Coordinate> coordinates;
std::vector<FixedPointCoordinate> coordinates;
typedef HashTable<std::string, std::string>::const_iterator OptionsIterator;
void setZoomLevel(const short i) {
@@ -109,7 +109,7 @@ struct RouteParameters {
void addCoordinate(const boost::fusion::vector < double, double > & arg_) {
int lat = COORDINATE_PRECISION*boost::fusion::at_c < 0 > (arg_);
int lon = COORDINATE_PRECISION*boost::fusion::at_c < 1 > (arg_);
coordinates.push_back(_Coordinate(lat, lon));
coordinates.push_back(FixedPointCoordinate(lat, lon));
}
};