Revert "Folds json_* utilities into json subfolder and adapts includes"

This reverts commit cd039c69c0a92a35889e3c875b8eb53cf07377bb.
This commit is contained in:
Daniel J. Hofmann 2016-02-12 15:23:33 -08:00
parent c9f0158fdb
commit 4b8c0ac143
12 changed files with 35 additions and 29 deletions

View File

@ -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)

View File

@ -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>

View File

@ -8,11 +8,11 @@
#include "engine/search_engine.hpp"
#include "util/for_each_pair.hpp"
#include "util/integer_range.hpp"
#include "osrm/json_container.hpp"
#include "util/json/renderer.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>

View File

@ -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>

View File

@ -1,11 +1,8 @@
#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

View File

@ -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() = default;
String(const char *value_) : value{value_} {}
String(std::string value_) : value{std::move(value_)} {}
String() {}
String(const char *value) : value(value) {}
String(std::string value) : value(std::move(value)) {}
std::string value;
};
struct Number
{
Number() = default;
Number(double value_) : value{value_} {}
Number() {}
Number(double value) : value(static_cast<double>(value)) {}
double value;
};
@ -95,7 +95,7 @@ struct Array
std::vector<Value> values;
};
} // namespace json
} // namespace JSON
} // namespace util
} // namespace osrm

View File

@ -9,11 +9,6 @@
#include "osrm/json_container.hpp"
#include <ostream>
#include <vector>
#include <iterator>
#include <string>
namespace osrm
{
namespace util
@ -128,11 +123,23 @@ struct ArrayRenderer
out.push_back(']');
}
void operator()(const True &) const { out.insert(end(out), {'t', 'r', 'u', 'e'}); }
void operator()(const True &) const
{
const std::string temp("true");
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 False &) const
{
const std::string temp("false");
out.insert(out.end(), temp.begin(), temp.end());
}
void operator()(const Null &) const { out.insert(end(out), {'n', 'u', 'l', 'l'}); }
void operator()(const Null &) const
{
const std::string temp("null");
out.insert(out.end(), temp.begin(), temp.end());
}
private:
std::vector<char> &out;

View File

@ -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"

View File

@ -4,13 +4,14 @@
#include "server/http/reply.hpp"
#include "server/http/request.hpp"
#include "util/json/container.hpp"
#include "util/json/renderer.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>

View File

@ -3,6 +3,7 @@
#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>