Commit 5c3122c1 authored by Matthias Greuter's avatar Matthias Greuter
Browse files

Change CreateMap parameter to accept a struct, which could be overloaded, i.e....

Change CreateMap parameter to accept a struct, which could be overloaded, i.e. for friction patch support
parent b423678f
......@@ -21,6 +21,7 @@
#include <MantleAPI/EnvironmentalConditions/weather.h>
#include <MantleAPI/Map/i_coord_converter.h>
#include <MantleAPI/Map/i_lane_location_query_service.h>
#include <MantleAPI/Map/map_details.h>
#include <MantleAPI/Traffic/i_entity_repository.h>
#include <string>
......@@ -37,7 +38,7 @@ class IEnvironment
///
/// @param file_path map file path from the scenario file. If this path is not resolved by the engine, the
/// environment must do so.
virtual void CreateMap(const std::string& map_file_path, const std::vector<Position>& map_region) = 0;
virtual void CreateMap(const std::string& map_file_path, const mantle_api::MapDetails* map_details) = 0;
/// Creates a controller from the given config. A created controller can be assigned to multiple entities
///
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file map_details.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_MAP_MAPDETAILS_H
#define MANTLEAPI_MAP_MAPDETAILS_H
#include <MantleAPI/Common/position.h>
#include <vector>
namespace mantle_api
{
struct MapDetails
{
virtual ~MapDetails() = default;
std::vector<Position> map_region;
};
} // namespace mantle_api
#endif // MANTLEAPI_MAP_MAPDETAILS_H
......@@ -301,7 +301,7 @@ class MockEnvironment : public mantle_api::IEnvironment
public:
MOCK_METHOD(void,
CreateMap,
(const std::string& file_path, const std::vector<mantle_api::Position>& map_region),
(const std::string& file_path, const mantle_api::MapDetails* map_details),
(override)
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment