forked from CEN4020-FSU/Assignment1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWeaponFactory.h
40 lines (35 loc) · 942 Bytes
/
WeaponFactory.h
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
/*
* File: WeaponFactory.h
* Author: Javier <[email protected]>
*
* Created on September 25, 2017, 3:25 PM
*/
#include "Weapon.h"
#ifndef WEAPONFACTORY_H
#define WEAPONFACTORY_H
/**
* Creation of weapons is encapsulated into the WeaponFactory class.
*
*/
class WeaponFactory{
public:
/**
* Return an implementation of a weapon given its name
* @param name Name of the weapon to be created
* @return Implementation of the method (an instance of the Weapon class)
*/
Weapon *getWeapon(std::string name);
/**
* Returns a singleton of type WeaponFactory
* @return An instance of WeaponFactory. There will be only one instance of this class in the entire prototype
*/
static WeaponFactory* getInstance();
/**
* Destructor
*/
~WeaponFactory(){}
private:
static WeaponFactory *instance;
WeaponFactory(){};
};
#endif /* WEAPONFACTORY_H */