Folds json_* utilities into json subfolder and adapts includes
This commit is contained in:
parent
fbef77a942
commit
ec01c2a119
@ -379,7 +379,7 @@ set_property(TARGET osrm-routed PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
file(GLOB VariantGlob third_party/variant/*.hpp)
|
||||
file(GLOB LibraryGlob include/osrm/*.hpp)
|
||||
set(EngineHeader include/engine/engine.hpp include/engine/engine_config.hpp include/engine/route_parameters.hpp)
|
||||
set(UtilHeader include/util/coordinate.hpp include/util/json_container.hpp)
|
||||
set(UtilHeader include/util/coordinate.hpp include/util/json/container.hpp)
|
||||
set(ExtractorHeader include/extractor/extractor.hpp include/extractor/extractor_config.hpp)
|
||||
set(ContractorHeader include/contractor/contractor.hpp include/contractor/contractor_config.hpp)
|
||||
#set(StorageHeader include/storage/storage.hpp include/storage/storage_config.hpp)
|
||||
|
@ -12,8 +12,8 @@
|
||||
#include "engine/routing_algorithms/map_matching.hpp"
|
||||
#include "util/coordinate_calculation.hpp"
|
||||
#include "util/integer_range.hpp"
|
||||
#include "util/json_logger.hpp"
|
||||
#include "util/json_util.hpp"
|
||||
#include "util/json/logger.hpp"
|
||||
#include "util/json/util.hpp"
|
||||
#include "util/string_util.hpp"
|
||||
|
||||
#include <cstdlib>
|
||||
|
@ -8,11 +8,11 @@
|
||||
#include "engine/search_engine.hpp"
|
||||
#include "util/for_each_pair.hpp"
|
||||
#include "util/integer_range.hpp"
|
||||
#include "util/json_renderer.hpp"
|
||||
#include "osrm/json_container.hpp"
|
||||
#include "util/json/renderer.hpp"
|
||||
#include "util/make_unique.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/timing_util.hpp"
|
||||
#include "osrm/json_container.hpp"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "util/coordinate_calculation.hpp"
|
||||
#include "engine/map_matching/hidden_markov_model.hpp"
|
||||
#include "util/json_logger.hpp"
|
||||
#include "util/json/logger.hpp"
|
||||
#include "util/matching_debug_info.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
|
@ -1,8 +1,11 @@
|
||||
#ifndef GLOBAL_JSON_CONTAINER_HPP
|
||||
#define GLOBAL_JSON_CONTAINER_HPP
|
||||
#include "util/json_container.hpp"
|
||||
|
||||
#include "util/json/container.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace json = osrm::util::json;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -33,9 +33,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <variant/variant.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace osrm
|
||||
@ -52,16 +52,16 @@ struct Array;
|
||||
|
||||
struct String
|
||||
{
|
||||
String() {}
|
||||
String(const char *value) : value(value) {}
|
||||
String(std::string value) : value(std::move(value)) {}
|
||||
String() = default;
|
||||
String(const char *value_) : value{value_} {}
|
||||
String(std::string value_) : value{std::move(value_)} {}
|
||||
std::string value;
|
||||
};
|
||||
|
||||
struct Number
|
||||
{
|
||||
Number() {}
|
||||
Number(double value) : value(static_cast<double>(value)) {}
|
||||
Number() = default;
|
||||
Number(double value_) : value{value_} {}
|
||||
double value;
|
||||
};
|
||||
|
||||
@ -95,7 +95,7 @@ struct Array
|
||||
std::vector<Value> values;
|
||||
};
|
||||
|
||||
} // namespace JSON
|
||||
} // namespace json
|
||||
} // namespace util
|
||||
} // namespace osrm
|
||||
|
@ -9,6 +9,11 @@
|
||||
|
||||
#include "osrm/json_container.hpp"
|
||||
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace util
|
||||
@ -123,23 +128,11 @@ struct ArrayRenderer
|
||||
out.push_back(']');
|
||||
}
|
||||
|
||||
void operator()(const True &) const
|
||||
{
|
||||
const std::string temp("true");
|
||||
out.insert(out.end(), temp.begin(), temp.end());
|
||||
}
|
||||
void operator()(const True &) const { out.insert(end(out), {'t', 'r', 'u', 'e'}); }
|
||||
|
||||
void operator()(const False &) const
|
||||
{
|
||||
const std::string temp("false");
|
||||
out.insert(out.end(), temp.begin(), temp.end());
|
||||
}
|
||||
void operator()(const False &) const { out.insert(end(out), {'f', 'a', 'l', 's', 'e'}); }
|
||||
|
||||
void operator()(const Null &) const
|
||||
{
|
||||
const std::string temp("null");
|
||||
out.insert(out.end(), temp.begin(), temp.end());
|
||||
}
|
||||
void operator()(const Null &) const { out.insert(end(out), {'n', 'u', 'l', 'l'}); }
|
||||
|
||||
private:
|
||||
std::vector<char> &out;
|
@ -1,8 +1,8 @@
|
||||
#ifndef MATCHING_DEBUG_INFO_HPP
|
||||
#define MATCHING_DEBUG_INFO_HPP
|
||||
|
||||
#include "util/json_logger.hpp"
|
||||
#include "util/json_util.hpp"
|
||||
#include "util/json/logger.hpp"
|
||||
#include "util/json/util.hpp"
|
||||
#include "engine/map_matching/hidden_markov_model.hpp"
|
||||
|
||||
#include "osrm/coordinate.hpp"
|
||||
|
@ -4,14 +4,13 @@
|
||||
#include "server/http/reply.hpp"
|
||||
#include "server/http/request.hpp"
|
||||
|
||||
#include "util/json_renderer.hpp"
|
||||
#include "util/json/container.hpp"
|
||||
#include "util/json/renderer.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/string_util.hpp"
|
||||
#include "util/xml_renderer.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include "engine/route_parameters.hpp"
|
||||
#include "util/json_container.hpp"
|
||||
#include "osrm/osrm.hpp"
|
||||
|
||||
#include <ctime>
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "util/static_rtree.hpp"
|
||||
#include "extractor/query_node.hpp"
|
||||
#include "extractor/edge_based_node.hpp"
|
||||
#include "util/floating_point.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
Loading…
Reference in New Issue
Block a user