Newer
Older
/*******************************************************************************
* Copyright (c) 2021-2024, 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 scenario_info.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_EXECUTION_SCENARIO_INFO_H
#define MANTLEAPI_EXECUTION_SCENARIO_INFO_H
Arun Das
committed
#include <MantleAPI/Common/time_utils.h>
#include <MantleAPI/Map/map_details.h>
/// Information about the scenario
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/// Default constructor to avoid nullptr for map details
ScenarioInfo() = default;
/// Copy constructor
/// @param other scenario info to copy
ScenarioInfo(const ScenarioInfo& other)
: scenario_timeout_duration{other.scenario_timeout_duration},
description{other.description},
full_map_path{other.full_map_path},
map_details{other.map_details->Clone()},
additional_information{other.additional_information}
{
}
/// Move constructor
/// @param other scenario info to move
ScenarioInfo(ScenarioInfo&& other) noexcept = default;
/// Copy assignment operator
/// @param other scenario info to copy assign
/// @return copied ScenarioInfo
ScenarioInfo& operator=(const ScenarioInfo& other)
{
if (this != &other)
{
scenario_timeout_duration = other.scenario_timeout_duration;
description = other.description;
full_map_path = other.full_map_path;
map_details = other.map_details->Clone();
additional_information = other.additional_information;
}
return *this;
}
/// Move assignment operator
/// @param other scenario info to move assign
/// @return moved ScenarioInfo
ScenarioInfo& operator=(ScenarioInfo&& other) noexcept = default;
~ScenarioInfo() = default;
/// Duration of the scenario timeout
/// Specific description of the scenario
/// Absolute path to the map
std::string full_map_path;
/// Definition of the map area
std::unique_ptr<MapDetails> map_details{std::make_unique<MapDetails>()};
/// Additional custom information about the scenario
std::map<std::string, std::string> additional_information;
#endif // MANTLEAPI_EXECUTION_SCENARIO_INFO_H