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

#include "interfaces/component.hpp"
#include "interfaces/cursor.hpp"

#include "engine/data/vector2.hpp"

#include <yacppdic/factory.hpp>

#include <memory>

// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class IComponentRenderer
{
public:
	virtual ~IComponentRenderer() = default;

	virtual void render(
		const std::shared_ptr<IComponent> &component,
		const Vector2 &position) noexcept = 0;
};

using IComponentRendererFactory = yacppdic::Factory<std::unique_ptr<IComponentRenderer>(
	const std::shared_ptr<ICursorController> &)>;