Moved Printer class into Out class
[openstranded.git] / src / unit.hh
blob7df0543d715b149c7885866ff3ad244452f40872
1 /*
2 * This file includes the definitions for the unit specific classes
3 * derived from the Kingdom, Type and Entity base classes
5 * This file is part of OpenStranded
7 * Copyright (C) 2008 David Kolossa
9 * OpenStranded is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
14 * OpenStranded is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with OpenStranded. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef STRANDED_UNIT_HH
24 #define STRANDED_UNIT_HH
26 #include "kingdom.hh"
27 #include "type.hh"
28 #include "entity.hh"
30 // Unit Kingdom's Constant ID
31 #define S2_UNIT 2
33 /**
34 * This is the class of all entities which belong to the "unit" kingdom.
35 * An unit is a mobile and intelligent (or controlled) entity.
37 class UnitEntity: public Entity
39 public:
40 /**
41 * The constructor.
42 * @param type The ID of the new entity's type
44 UnitEntity (ID type);
48 /**
49 * This is the class of the unit type.
51 class UnitType: public Type
53 public:
54 /**
55 * The constructor.
56 * @param name The name of the new type
58 UnitType (const char* name);
62 /**
63 * This is the class of the unit kingdom
65 class UnitKingdom: public Kingdom
67 public:
68 /**
69 * The constructor.
71 UnitKingdom ();
76 // Virtual functions
79 /**
80 * Create a new unit entity.
81 * @param The ID of the new entity's type
82 * @return A pointer to the created entity
83 * @see UnitEntity::UnitEntity()
85 Entity*
86 createEntity (ID type);
88 /**
89 * Create a new type.
90 * @param The name of the new type
91 * @return A pointer to the created type
92 * @see UnitType::UnitType()
94 Type*
95 createType (const char* name);
99 #endif /* STRANDED_UNIT_HH */