rename osrm_input_path to osrm_path, clang-format

This commit is contained in:
Pepijn Schoen
2017-05-05 10:23:09 +02:00
committed by Daniel J. H
parent 1b31099f73
commit 67fae1d1f0
11 changed files with 52 additions and 58 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ struct ContractorConfig final : storage::IOConfig
void UseDefaultOutputNames()
{
IOConfig::UseDefaultOutputNames();
updater_config.osrm_input_path = osrm_input_path;
updater_config.osrm_path = osrm_path;
updater_config.UseDefaultOutputNames();
}
+2 -2
View File
@@ -6,8 +6,8 @@
#include <array>
#include <string>
#include "updater/updater_config.hpp"
#include "storage/io_config.hpp"
#include "updater/updater_config.hpp"
namespace osrm
{
@@ -21,7 +21,7 @@ struct CustomizationConfig final : storage::IOConfig
void UseDefaultOutputNames()
{
IOConfig::UseDefaultOutputNames();
updater_config.osrm_input_path = osrm_input_path;
updater_config.osrm_path = osrm_path;
updater_config.UseDefaultOutputNames();
}
+1 -1
View File
@@ -57,7 +57,7 @@ class ExtractionContainers
ExtractionContainers();
void PrepareData(ScriptingEnvironment &scripting_environment,
const std::string &osrm_input_path,
const std::string &osrm_path,
const std::string &restrictions_file_name,
const std::string &names_data_path);
};
+1 -1
View File
@@ -61,7 +61,7 @@ struct ExtractorConfig final : storage::IOConfig
}
}
osrm_input_path = basepath + ".osrm";
osrm_path = basepath + ".osrm";
IOConfig::UseDefaultOutputNames();
}
+32 -37
View File
@@ -1,5 +1,5 @@
#ifndef IO_CONFIG_HPP
#define IO_CONFIG_HPP
#ifndef OSRM_IO_CONFIG_HPP
#define OSRM_IO_CONFIG_HPP
#include <boost/filesystem/path.hpp>
@@ -11,45 +11,42 @@ struct IOConfig
{
IOConfig() = default;
IOConfig(const boost::filesystem::path &base) : osrm_input_path(base)
{
UseDefaultOutputNames();
}
IOConfig(const boost::filesystem::path &base) : osrm_path(base) { UseDefaultOutputNames(); }
// Infer the output names from the path of the .osrm file
void UseDefaultOutputNames()
{
ram_index_path = {osrm_input_path.string() + ".ramIndex"};
file_index_path = {osrm_input_path.string() + ".fileIndex"};
hsgr_data_path = {osrm_input_path.string() + ".hsgr"};
nodes_data_path = {osrm_input_path.string() + ".nodes"};
edges_data_path = {osrm_input_path.string() + ".edges"};
core_data_path = {osrm_input_path.string() + ".core"};
geometries_path = {osrm_input_path.string() + ".geometry"};
timestamp_path = {osrm_input_path.string() + ".timestamp"};
turn_weight_penalties_path = {osrm_input_path.string() + ".turn_weight_penalties"};
turn_duration_penalties_path = {osrm_input_path.string() + ".turn_duration_penalties"};
turn_penalties_index_path = {osrm_input_path.string() + ".turn_penalties_index"};
datasource_names_path = {osrm_input_path.string() + ".datasource_names"};
names_data_path = {osrm_input_path.string() + ".names"};
properties_path = {osrm_input_path.string() + ".properties"};
intersection_class_path = {osrm_input_path.string() + ".icd"};
turn_lane_data_path = {osrm_input_path.string() + ".tld"};
turn_lane_description_path = {osrm_input_path.string() + ".tls"};
mld_partition_path = {osrm_input_path.string() + ".partition"};
mld_storage_path = {osrm_input_path.string() + ".cells"};
mld_graph_path = {osrm_input_path.string() + ".mldgr"};
level_path = {osrm_input_path.string() + ".level"};
node_path = {osrm_input_path.string() + ".enw"};
edge_based_nodes_data_path = {osrm_input_path.string() + ".nodes_data"};
edge_based_graph_path = {osrm_input_path.string() + ".ebg"};
compressed_node_based_graph_path = {osrm_input_path.string() + ".cnbg"};
cnbg_ebg_mapping_path = {osrm_input_path.string() + ".cnbg_to_ebg"};
restriction_path = {osrm_input_path.string() + ".restrictions"};
intersection_class_data_path = {osrm_input_path.string() + ".icd"};
ram_index_path = {osrm_path.string() + ".ramIndex"};
file_index_path = {osrm_path.string() + ".fileIndex"};
hsgr_data_path = {osrm_path.string() + ".hsgr"};
nodes_data_path = {osrm_path.string() + ".nodes"};
edges_data_path = {osrm_path.string() + ".edges"};
core_data_path = {osrm_path.string() + ".core"};
geometries_path = {osrm_path.string() + ".geometry"};
timestamp_path = {osrm_path.string() + ".timestamp"};
turn_weight_penalties_path = {osrm_path.string() + ".turn_weight_penalties"};
turn_duration_penalties_path = {osrm_path.string() + ".turn_duration_penalties"};
turn_penalties_index_path = {osrm_path.string() + ".turn_penalties_index"};
datasource_names_path = {osrm_path.string() + ".datasource_names"};
names_data_path = {osrm_path.string() + ".names"};
properties_path = {osrm_path.string() + ".properties"};
intersection_class_path = {osrm_path.string() + ".icd"};
turn_lane_data_path = {osrm_path.string() + ".tld"};
turn_lane_description_path = {osrm_path.string() + ".tls"};
mld_partition_path = {osrm_path.string() + ".partition"};
mld_storage_path = {osrm_path.string() + ".cells"};
mld_graph_path = {osrm_path.string() + ".mldgr"};
level_path = {osrm_path.string() + ".level"};
node_path = {osrm_path.string() + ".enw"};
edge_based_nodes_data_path = {osrm_path.string() + ".nodes_data"};
edge_based_graph_path = {osrm_path.string() + ".ebg"};
compressed_node_based_graph_path = {osrm_path.string() + ".cnbg"};
cnbg_ebg_mapping_path = {osrm_path.string() + ".cnbg_to_ebg"};
restriction_path = {osrm_path.string() + ".restrictions"};
intersection_class_data_path = {osrm_path.string() + ".icd"};
}
boost::filesystem::path osrm_input_path;
boost::filesystem::path osrm_path;
boost::filesystem::path ram_index_path;
boost::filesystem::path file_index_path;
@@ -80,8 +77,6 @@ struct IOConfig
boost::filesystem::path cnbg_ebg_mapping_path;
boost::filesystem::path restriction_path;
boost::filesystem::path intersection_class_data_path;
};
}
}