15 #ifndef TRAFFIC_SIMULATOR__API__CONFIGURATION_HPP_
16 #define TRAFFIC_SIMULATOR__API__CONFIGURATION_HPP_
19 #include <boost/filesystem.hpp>
20 #include <boost/filesystem/operations.hpp>
21 #include <boost/range/iterator_range.hpp>
78 }
else if (not boost::filesystem::is_directory(
map_path)) {
80 "The map_path must be a directory (given an ", std::quoted(
map_path.string()),
")");
90 template <
typename... Ts>
101 for (
const auto & each :
102 boost::make_iterator_range(boost::filesystem::directory_iterator(pathname), {})) {
103 const auto filename = each.path().filename().string();
105 each.path().extension() == extension and
106 std::lexicographical_compare(
107 std::cbegin(result), std::cend(result), std::cbegin(filename), std::cend(filename))) {
Definition: junit5.hpp:25
std::string string
Definition: junit5.hpp:26
A problem occurred that interfered with the continuation of the simulation.
Definition: exception.hpp:47
Definition: configuration.hpp:29
auto lanelet2_map_path() const
Definition: configuration.hpp:133
auto contains(Ts &&... xs) const -> bool
Definition: configuration.hpp:91
const Pathname map_path
Definition: configuration.hpp:59
Configuration(const Pathname &map_path)
Definition: configuration.hpp:67
auto getLanelet2MapFile() const -> const auto &
Definition: configuration.hpp:115
auto assertMapPath(const Pathname &map_path) const -> const Pathname &
Definition: configuration.hpp:74
std::string Filename
Definition: configuration.hpp:30
auto findLexicographicallyFirstFilenameOf(const Pathname &pathname, const std::string &extension) const -> Filename
Definition: configuration.hpp:96
double v2i_traffic_light_publish_rate
Definition: configuration.hpp:44
auto getPointCloudMapFile() const -> const auto &
Definition: configuration.hpp:124
bool standalone_mode
Definition: configuration.hpp:38
Filename pointcloud_map_file
Definition: configuration.hpp:63
bool verbose
Definition: configuration.hpp:36
bool auto_sink
Definition: configuration.hpp:34
std::string simulator_host
Definition: configuration.hpp:40
Pathname scenario_path
Definition: configuration.hpp:65
Filename lanelet2_map_file
Definition: configuration.hpp:61
boost::filesystem::path Pathname
Definition: configuration.hpp:32
double conventional_traffic_light_publish_rate
Definition: configuration.hpp:42
auto pointcloud_map_path() const
Definition: configuration.hpp:135