aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/component.hpp
blob: 7e1b132f8f1ef6684c72b17dada215df02c6659e (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
#pragma once

#include "interfaces/matrix.hpp"

#include <memory>

// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class IComponent
{
public:
	using ComponentMatrix = IMatrix<char>;

	virtual ~IComponent() = default;

	[[nodiscard]] virtual auto get() const noexcept
		-> const std::shared_ptr<ComponentMatrix> & = 0;

	[[nodiscard]] virtual auto get_need_render() const noexcept -> bool = 0;

	virtual void set_need_render(bool need_render) noexcept = 0;

	[[nodiscard]] virtual auto get_foreground_color() const noexcept -> uint32_t = 0;

	[[nodiscard]] virtual auto get_background_color() const noexcept -> uint32_t = 0;
};