osrm-backend/include/osrm/route_parameters.hpp

128 lines
3.7 KiB
C++
Raw Normal View History

2015-01-27 07:17:18 -05:00
/*
Copyright (c) 2016, Project OSRM contributors
2015-01-27 07:17:18 -05:00
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ROUTE_PARAMETERS_HPP
#define ROUTE_PARAMETERS_HPP
2015-01-27 07:17:18 -05:00
2016-01-02 11:13:44 -05:00
#include "coordinate.hpp"
2015-01-27 07:17:18 -05:00
#include <boost/fusion/container/vector/vector_fwd.hpp>
#include <boost/spirit/include/qi.hpp>
2015-01-27 07:17:18 -05:00
#include <string>
#include <vector>
2016-01-05 10:51:13 -05:00
namespace osrm
{
namespace engine
{
2015-01-27 07:17:18 -05:00
struct RouteParameters
{
RouteParameters();
2016-01-04 05:36:21 -05:00
void SetZoomLevel(const short level);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetNumberOfResults(const short number);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetAlternateRouteFlag(const bool flag);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetUTurn(const bool flag);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetAllUTurns(const bool flag);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetClassify(const bool classify);
2015-03-02 17:12:44 -05:00
2016-01-04 05:36:21 -05:00
void SetMatchingBeta(const double beta);
2015-03-02 17:12:44 -05:00
2016-01-04 05:36:21 -05:00
void SetGPSPrecision(const double precision);
2015-03-02 17:12:44 -05:00
2016-01-04 05:36:21 -05:00
void SetDeprecatedAPIFlag(const std::string &);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetChecksum(const unsigned check_sum);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetInstructionFlag(const bool flag);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetService(const std::string &service);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetOutputFormat(const std::string &format);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetJSONpParameter(const std::string &parameter);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void AddHint(const std::string &hint);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void AddTimestamp(const unsigned timestamp);
2016-01-04 05:36:21 -05:00
void AddBearing(const boost::fusion::vector<int, boost::optional<int>> &received_bearing,
2016-01-05 06:04:04 -05:00
boost::spirit::qi::unused_type unused,
bool &pass);
2016-01-04 05:36:21 -05:00
void SetLanguage(const std::string &language);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetGeometryFlag(const bool flag);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void SetCompressionFlag(const bool flag);
2015-01-27 07:17:18 -05:00
2016-01-04 05:36:21 -05:00
void AddCoordinate(const boost::fusion::vector<double, double> &received_coordinates);
2016-01-04 05:36:21 -05:00
void AddDestination(const boost::fusion::vector<double, double> &received_coordinates);
2016-01-04 05:36:21 -05:00
void AddSource(const boost::fusion::vector<double, double> &received_coordinates);
2016-01-04 05:36:21 -05:00
void SetCoordinatesFromGeometry(const std::string &geometry_string);
2015-01-27 07:17:18 -05:00
short zoom_level;
bool print_instructions;
bool alternate_route;
bool geometry;
bool compression;
bool deprecatedAPI;
bool uturn_default;
2015-03-02 17:12:44 -05:00
bool classify;
double matching_beta;
double gps_precision;
2015-01-27 07:17:18 -05:00
unsigned check_sum;
short num_results;
std::string service;
std::string output_format;
std::string jsonp_parameter;
std::string language;
std::vector<std::string> hints;
std::vector<unsigned> timestamps;
2016-01-05 06:04:04 -05:00
std::vector<std::pair<const int, const boost::optional<int>>> bearings;
2015-01-27 07:17:18 -05:00
std::vector<bool> uturns;
std::vector<FixedPointCoordinate> coordinates;
2015-12-07 21:16:07 -05:00
std::vector<bool> is_destination;
std::vector<bool> is_source;
2015-01-27 07:17:18 -05:00
};
2016-01-05 10:51:13 -05:00
}
using engine::RouteParameters;
}
#endif // ROUTE_PARAMETERS_HPP