VIPRA Documentation
Loading...
Searching...
No Matches
polygon_input.hpp
1#pragma once
2
3#include <optional>
4#include <type_traits>
5#include <vector>
6
7#include "vipra/geometry/polygon.hpp"
8#include "vipra/modules/module.hpp"
9#include "vipra/util/crtp.hpp"
10
11namespace VIPRA::Modules {
12
17template <typename module_t>
18class PolygonInput : public Util::CRTP<PolygonInput<module_t>> {
20
21 public:
30 template <typename... keys_t>
31 [[nodiscard]] auto load_polygons(keys_t&&... keys) const
32 -> std::optional<std::vector<VIPRA::Geometry::Polygon>>
33 {
34 return self().template get<std::vector<VIPRA::Geometry::Polygon>>(
35 std::forward<keys_t>(keys)...);
36 }
37};
38
39} // namespace VIPRA::Modules
Dummy polygon input for use in other concepts.
Definition polygon_input.hpp:18
auto load_polygons(keys_t &&... keys) const -> std::optional< std::vector< VIPRA::Geometry::Polygon > >
Returns polygons as loaded from the input module, std::nullopt if incorrect type / doesn't exist.
Definition polygon_input.hpp:31
Definition crtp.hpp:6