| 1 |
#ifndef HEADER_MODELFACTORY_H |
| 2 |
#define HEADER_MODELFACTORY_H |
| 3 |
|
| 4 |
class V2; |
| 5 |
class Unit; |
| 6 |
|
| 7 |
#include "Cube.h" |
| 8 |
#include "ControlSym.h" |
| 9 |
#include "Dir.h" |
| 10 |
|
| 11 |
#include <string> |
| 12 |
|
| 13 |
/** |
| 14 |
* Knows how to create new models. |
| 15 |
*/ |
| 16 |
class ModelFactory { |
| 17 |
private: |
| 18 |
static void createParams(const std::string &kind, |
| 19 |
Cube::eWeight *out_weight, Cube::eWeight *out_power, |
| 20 |
bool *out_alive); |
| 21 |
static ControlSym parseExtraControlSym(const std::string &kind); |
| 22 |
static Cube *createOutputItem(const std::string &kind, const V2 &loc, |
| 23 |
const std::string &shape); |
| 24 |
public: |
| 25 |
static Cube *createModel(const std::string &kind, const V2 &loc, |
| 26 |
const std::string &shape); |
| 27 |
static Unit *createUnit(const std::string &kind); |
| 28 |
static Cube *createBorder(); |
| 29 |
}; |
| 30 |
|
| 31 |
#endif |