VIPRA Documentation
Loading...
Searching...
No Matches
map_input.hpp
1#pragma once
2
3#include <map>
4#include <optional>
5#include <vector>
6
7#include "vipra/geometry/polygon.hpp"
8
9namespace VIPRA::Modules {
10
15class MapInput {
16 public:
17 virtual void load(std::string const&) = 0;
18
27 [[nodiscard]] virtual auto get_obstacles() const
28 -> std::optional<std::vector<VIPRA::Geometry::Polygon>> = 0;
29
38 [[nodiscard]] virtual auto get_spawns() const
39 -> std::optional<std::vector<VIPRA::Geometry::Polygon>> = 0;
40
49 [[nodiscard]] virtual auto get_objectives() const
50 -> std::optional<std::map<std::string, std::vector<VIPRA::Geometry::Polygon>>> = 0;
51
60 [[nodiscard]] virtual auto get_areas() const
61 -> std::optional<std::map<std::string, VIPRA::Geometry::Polygon>> = 0;
62
63 virtual ~MapInput() = default;
64
65 MapInput() = default;
66 MapInput(const MapInput&) = default;
67 MapInput(MapInput&&) = default;
68 auto operator=(const MapInput&) -> MapInput& = default;
69 auto operator=(MapInput&&) -> MapInput& = default;
70};
71
72} // namespace VIPRA::Modules
virtual auto get_spawns() const -> std::optional< std::vector< VIPRA::Geometry::Polygon > >=0
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist.
virtual auto get_areas() const -> std::optional< std::map< std::string, VIPRA::Geometry::Polygon > >=0
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist.
virtual auto get_obstacles() const -> std::optional< std::vector< VIPRA::Geometry::Polygon > >=0
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist.
virtual auto get_objectives() const -> std::optional< std::map< std::string, std::vector< VIPRA::Geometry::Polygon > > >=0
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist.