aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/src/enemy_creator.hpp
blob: a220008743a4e28a6afe1a9b56a4a6a57915e777 (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
#pragma once

#include "interfaces/enemy.hpp"
#include "interfaces/enemy_creator.hpp"

#include <yacppdic/auto_wirable.hpp>
#include <yacppdic/tagged.hpp>

class EnemyCreator : public IEnemyCreator,
					 public yacppdic::AutoWirable<
						 IEnemyCreator,
						 EnemyCreator,
						 yacppdic::Tagged<IEnemyFactory, SMALL_ENEMY_TAG>,
						 yacppdic::Tagged<IEnemyFactory, BIG_ENEMY_TAG>>
{
public:
	EnemyCreator(
		IEnemyFactory small_enemy_factory,
		IEnemyFactory big_enemy_factory
	) noexcept;

	std::unique_ptr<IEnemy> create_small_enemy() noexcept override;

	std::unique_ptr<IEnemy> create_big_enemy() noexcept override;

private:
	IEnemyFactory _small_enemy_factory;
	IEnemyFactory _big_enemy_factory;
};