C++ Project 2016-2017: Arkanoid
sfml_factory.h
Go to the documentation of this file.
1 
3 #ifndef SFML_FACTORY_H
4 #define SFML_FACTORY_H
5 
6 #include "entity_factory.h"
7 #include "../logic/entity/player/player.h"
8 #include "../logic/entity/ball/ball.h"
9 #include "../logic/entity/wall/wall.h"
10 #include "../logic/entity/block/block.h"
11 
12 #include <SFML/Graphics.hpp>
13 #include <iostream>
14 #include <vector>
15 #include <memory>
16 
17 using namespace std;
18 
20 class SFMLFactory : public EntityFactory {
21 private:
22  // Needed to create Entity.
23  sf::RenderWindow &windowSFML;
24 
25 public:
26 
32  SFMLFactory(sf::RenderWindow &window);
33 
39  unique_ptr<arkanoid::Player> createPlayer();
40 
46  vector<unique_ptr<arkanoid::Wall>> createWalls();
47 
55  vector<unique_ptr<arkanoid::Block>> createBlocks(const string &file);
56 
62  unique_ptr<arkanoid::Ball> createBall();
63 };
64 
65 #endif /* SFML_FACTORY_H */
Abstract Factory: Creates arkanoid::Entity.
Factory: Creates EntitySFML.
Definition: sfml_factory.h:20