renamed: Util/* -> util/*
This commit is contained in:
+15
-14
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2014, Project OSRM, Dennis Luxen, others
|
||||
Copyright (c) 2015, Project OSRM, Dennis Luxen, others
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
@@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef DISTANCE_TABLE_PLUGIN_H
|
||||
#define DISTANCE_TABLE_PLUGIN_H
|
||||
#ifndef DISTANCE_TABLE_HPP
|
||||
#define DISTANCE_TABLE_HPP
|
||||
|
||||
#include "plugin_base.hpp"
|
||||
|
||||
@@ -34,10 +34,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "../data_structures/query_edge.hpp"
|
||||
#include "../data_structures/search_engine.hpp"
|
||||
#include "../descriptors/descriptor_base.hpp"
|
||||
#include "../Util/json_renderer.hpp"
|
||||
#include "../Util/make_unique.hpp"
|
||||
#include "../Util/string_util.hpp"
|
||||
#include "../Util/timing_util.hpp"
|
||||
#include "../util/json_renderer.hpp"
|
||||
#include "../util/make_unique.hpp"
|
||||
#include "../util/string_util.hpp"
|
||||
#include "../util/timing_util.hpp"
|
||||
|
||||
#include <osrm/json_container.hpp>
|
||||
|
||||
@@ -56,8 +56,9 @@ template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||
int max_locations_distance_table;
|
||||
|
||||
public:
|
||||
explicit DistanceTablePlugin(DataFacadeT *facade, const int max_locations_distance_table) :
|
||||
max_locations_distance_table(max_locations_distance_table), descriptor_string("table"), facade(facade)
|
||||
explicit DistanceTablePlugin(DataFacadeT *facade, const int max_locations_distance_table)
|
||||
: max_locations_distance_table(max_locations_distance_table), descriptor_string("table"),
|
||||
facade(facade)
|
||||
{
|
||||
search_engine_ptr = osrm::make_unique<SearchEngine<DataFacadeT>>(facade);
|
||||
}
|
||||
@@ -74,8 +75,9 @@ template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||
}
|
||||
|
||||
const bool checksum_OK = (route_parameters.check_sum == facade->GetCheckSum());
|
||||
unsigned max_locations = std::min(static_cast<unsigned>(max_locations_distance_table),
|
||||
static_cast<unsigned>(route_parameters.coordinates.size()));
|
||||
unsigned max_locations =
|
||||
std::min(static_cast<unsigned>(max_locations_distance_table),
|
||||
static_cast<unsigned>(route_parameters.coordinates.size()));
|
||||
|
||||
PhantomNodeArray phantom_node_vector(max_locations);
|
||||
for (const auto i : osrm::irange(0u, max_locations))
|
||||
@@ -92,8 +94,7 @@ template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||
}
|
||||
}
|
||||
facade->IncrementalFindPhantomNodeForCoordinate(route_parameters.coordinates[i],
|
||||
phantom_node_vector[i],
|
||||
1);
|
||||
phantom_node_vector[i], 1);
|
||||
|
||||
BOOST_ASSERT(phantom_node_vector[i].front().is_valid(facade->GetNumberOfNodes()));
|
||||
}
|
||||
@@ -128,4 +129,4 @@ template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||
DataFacadeT *facade;
|
||||
};
|
||||
|
||||
#endif // DISTANCE_TABLE_PLUGIN_H
|
||||
#endif // DISTANCE_TABLE_HPP
|
||||
|
||||
+10
-8
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2014, Project OSRM, Dennis Luxen, others
|
||||
Copyright (c) 2015, Project OSRM, Dennis Luxen, others
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
@@ -25,13 +25,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef HELLO_WORLD_PLUGIN_H
|
||||
#define HELLO_WORLD_PLUGIN_H
|
||||
#ifndef HELLO_WORLD_HPP
|
||||
#define HELLO_WORLD_HPP
|
||||
|
||||
#include "plugin_base.hpp"
|
||||
|
||||
#include "../Util/cast.hpp"
|
||||
#include "../Util/json_renderer.hpp"
|
||||
#include "../util/cast.hpp"
|
||||
#include "../util/json_renderer.hpp"
|
||||
|
||||
#include <osrm/json_container.hpp>
|
||||
|
||||
@@ -77,8 +77,10 @@ class HelloWorldPlugin final : public BasePlugin
|
||||
JSON::Object json_location;
|
||||
JSON::Array json_coordinates;
|
||||
|
||||
json_coordinates.values.push_back(static_cast<double>(coordinate.lat / COORDINATE_PRECISION));
|
||||
json_coordinates.values.push_back(static_cast<double>(coordinate.lon / COORDINATE_PRECISION));
|
||||
json_coordinates.values.push_back(
|
||||
static_cast<double>(coordinate.lat / COORDINATE_PRECISION));
|
||||
json_coordinates.values.push_back(
|
||||
static_cast<double>(coordinate.lon / COORDINATE_PRECISION));
|
||||
json_location.values[cast::integral_to_string(counter)] = json_coordinates;
|
||||
json_locations.values.push_back(json_location);
|
||||
++counter;
|
||||
@@ -101,4 +103,4 @@ class HelloWorldPlugin final : public BasePlugin
|
||||
std::string descriptor_string;
|
||||
};
|
||||
|
||||
#endif // HELLO_WORLD_PLUGIN_H
|
||||
#endif // HELLO_WORLD_HPP
|
||||
|
||||
+8
-7
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2014, Project OSRM, Dennis Luxen, others
|
||||
Copyright (c) 2015, Project OSRM, Dennis Luxen, others
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
@@ -25,13 +25,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef LOCATE_PLUGIN_H
|
||||
#define LOCATE_PLUGIN_H
|
||||
#ifndef LOCATE_HPP
|
||||
#define LOCATE_HPP
|
||||
|
||||
#include "plugin_base.hpp"
|
||||
|
||||
#include "../Util/json_renderer.hpp"
|
||||
#include "../Util/string_util.hpp"
|
||||
#include "../util/json_renderer.hpp"
|
||||
#include "../util/string_util.hpp"
|
||||
|
||||
#include <osrm/json_container.hpp>
|
||||
|
||||
@@ -47,7 +47,8 @@ template <class DataFacadeT> class LocatePlugin final : public BasePlugin
|
||||
int HandleRequest(const RouteParameters &route_parameters, JSON::Object &json_result) final
|
||||
{
|
||||
// check number of parameters
|
||||
if (route_parameters.coordinates.empty() || !route_parameters.coordinates.front().is_valid())
|
||||
if (route_parameters.coordinates.empty() ||
|
||||
!route_parameters.coordinates.front().is_valid())
|
||||
{
|
||||
return 400;
|
||||
}
|
||||
@@ -74,4 +75,4 @@ template <class DataFacadeT> class LocatePlugin final : public BasePlugin
|
||||
DataFacadeT *facade;
|
||||
};
|
||||
|
||||
#endif /* LOCATE_PLUGIN_H */
|
||||
#endif /* LOCATE_HPP */
|
||||
|
||||
+10
-8
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2014, Project OSRM, Dennis Luxen, others
|
||||
Copyright (c) 2015, Project OSRM, Dennis Luxen, others
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
@@ -25,14 +25,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef NEAREST_PLUGIN_H
|
||||
#define NEAREST_PLUGIN_H
|
||||
#ifndef NEAREST_HPP
|
||||
#define NEAREST_HPP
|
||||
|
||||
#include "plugin_base.hpp"
|
||||
|
||||
#include "../data_structures/phantom_node.hpp"
|
||||
#include "../Util/integer_range.hpp"
|
||||
#include "../Util/json_renderer.hpp"
|
||||
#include "../util/integer_range.hpp"
|
||||
#include "../util/json_renderer.hpp"
|
||||
|
||||
#include <osrm/json_container.hpp>
|
||||
|
||||
@@ -52,7 +52,8 @@ template <class DataFacadeT> class NearestPlugin final : public BasePlugin
|
||||
int HandleRequest(const RouteParameters &route_parameters, JSON::Object &json_result) final
|
||||
{
|
||||
// check number of parameters
|
||||
if (route_parameters.coordinates.empty() || !route_parameters.coordinates.front().is_valid())
|
||||
if (route_parameters.coordinates.empty() ||
|
||||
!route_parameters.coordinates.front().is_valid())
|
||||
{
|
||||
return 400;
|
||||
}
|
||||
@@ -76,7 +77,8 @@ template <class DataFacadeT> class NearestPlugin final : public BasePlugin
|
||||
JSON::Array results;
|
||||
|
||||
auto vector_length = phantom_node_vector.size();
|
||||
for (const auto i : osrm::irange<std::size_t>(0, std::min(number_of_results, vector_length)))
|
||||
for (const auto i :
|
||||
osrm::irange<std::size_t>(0, std::min(number_of_results, vector_length)))
|
||||
{
|
||||
JSON::Array json_coordinate;
|
||||
JSON::Object result;
|
||||
@@ -113,4 +115,4 @@ template <class DataFacadeT> class NearestPlugin final : public BasePlugin
|
||||
std::string descriptor_string;
|
||||
};
|
||||
|
||||
#endif /* NEAREST_PLUGIN_H */
|
||||
#endif /* NEAREST_HPP */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2014, Project OSRM, Dennis Luxen, others
|
||||
Copyright (c) 2015, Project OSRM, Dennis Luxen, others
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
@@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "plugin_base.hpp"
|
||||
|
||||
#include "../Util/json_renderer.hpp"
|
||||
#include "../util/json_renderer.hpp"
|
||||
|
||||
#include <osrm/json_container.hpp>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2014, Project OSRM, Dennis Luxen, others
|
||||
Copyright (c) 2015, Project OSRM, Dennis Luxen, others
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
@@ -35,10 +35,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "../descriptors/descriptor_base.hpp"
|
||||
#include "../descriptors/gpx_descriptor.hpp"
|
||||
#include "../descriptors/json_descriptor.hpp"
|
||||
#include "../Util/integer_range.hpp"
|
||||
#include "../Util/json_renderer.hpp"
|
||||
#include "../Util/make_unique.hpp"
|
||||
#include "../Util/simple_logger.hpp"
|
||||
#include "../util/integer_range.hpp"
|
||||
#include "../util/json_renderer.hpp"
|
||||
#include "../util/make_unique.hpp"
|
||||
#include "../util/simple_logger.hpp"
|
||||
|
||||
#include <osrm/json_container.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user