Trip with Fixed Start and End points (TFSE) (#3408)

* fixed start and end trip feature to trip service
This commit is contained in:
Kajari Ghosh
2017-02-10 05:13:20 -05:00
committed by GitHub
parent 3e2db47cc8
commit 2218658969
15 changed files with 895 additions and 277 deletions
+28 -1
View File
@@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "engine/api/route_parameters.hpp"
#include <boost/optional.hpp>
#include <vector>
namespace osrm
@@ -47,7 +48,33 @@ namespace api
*/
struct TripParameters : public RouteParameters
{
// bool IsValid() const; Falls back to base class
TripParameters() = default;
enum class SourceType
{
Any,
First
};
enum class DestinationType
{
Any,
Last
};
template <typename... Args>
TripParameters(SourceType source_,
DestinationType destination_,
bool roundtrip_,
Args &&... args_)
: RouteParameters{std::forward<Args>(args_)...}, source{source_}, destination{destination_},
roundtrip{roundtrip_}
{
}
SourceType source = SourceType::Any;
DestinationType destination = DestinationType::Any;
bool roundtrip = true;
bool IsValid() const { return RouteParameters::IsValid(); }
};
}
}