blob: b7bb97de4339d5103bcff31714cfbdd40f65a4db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#pragma once
#include "interfaces/component.hpp"
#include "interfaces/cursor.hpp"
#include "interfaces/matrix.hpp"
#include "engine/data/bounds.hpp"
#include "engine/data/vector2.hpp"
#include <memory>
#include <string_view>
#include <utility>
#include <vector>
// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class IScene
{
public:
virtual ~IScene() noexcept = default;
using MatrixElement = char;
virtual void enter() noexcept = 0;
virtual void leave() noexcept = 0;
[[nodiscard]] virtual auto size() const noexcept -> Bounds = 0;
[[nodiscard]] virtual auto get_matrix() const noexcept
-> const std::shared_ptr<IMatrix<MatrixElement>> & = 0;
virtual void register_component(
const std::shared_ptr<IComponent> &component,
const Vector2 &position) noexcept = 0;
[[nodiscard]] virtual auto get_components() const noexcept
-> std::vector<std::pair<std::shared_ptr<IComponent>, Vector2>> = 0;
};
|