From dded2c2463fd9ca8674c117bd57ef53aa5939751 Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Thu, 18 Feb 2016 13:57:22 -0800 Subject: [PATCH] Adapt the example to include all osrm public headers --- .gitignore | 1 + example/example.cpp | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0270e7c3f..a58998a4a 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ Thumbs.db # build related files # ####################### /build/ +/example/build/ /cmake/postinst # Eclipse related files # diff --git a/example/example.cpp b/example/example.cpp index 5aeb897fe..1565ecb4e 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -1,6 +1,14 @@ -#include "osrm/json_container.hpp" -#include "osrm/engine_config.hpp" #include "osrm/route_parameters.hpp" +#include "osrm/table_parameters.hpp" +#include "osrm/nearest_parameters.hpp" +#include "osrm/trip_parameters.hpp" +#include "osrm/match_parameters.hpp" + +#include "osrm/coordinate.hpp" +#include "osrm/engine_config.hpp" +#include "osrm/json_container.hpp" + +#include "osrm/status.hpp" #include "osrm/osrm.hpp" #include @@ -46,7 +54,7 @@ int main(int argc, const char *argv[]) try if (result_code / 100 == 2) { // Extract data out of JSON structure - auto& summary = json_result.values["route_summary"].get(); + auto &summary = json_result.values["route_summary"].get(); auto duration = summary.values["total_time"].get().value; auto distance = summary.values["total_distance"].get().value; std::cout << "duration: " << duration << std::endl;