Introduced FileSystem and Out classes
[openstranded.git] / src / object.hh
blobfe7005e8ff196162267dfb65d73fb22aa37fe2e8
1 /*
2 * This file includes the definitions for the object specific classes
3 * derived from the Kingdom, Type and Entity base classes.
5 * Copyright (C) 2008 David Kolossa
7 * This file is part of OpenStranded
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_OBJECT_HH
24 #define STRANDED_OBJECT_HH
26 #include "kingdom.hh"
27 #include "type.hh"
28 #include "entity.hh"
30 #define S2_OBJECT 1
32 /**
33 * This is the class of all entities which belong to the kingdom
34 * "object", derived from the type base class.
35 * This class represents an object: an entity which doesn't move,
36 * except on script actions. In addition, the player's action with
37 * objects are mostly limited to damaging and destroying them
38 * (without scripts).
40 class ObjectEntity: public Entity
42 public:
43 /**
44 * The constructor.
45 * @param The ID of the ObjectType this entity belongs to
46 * @see Entity::Entity()
48 ObjectEntity (ID type);
52 /**
53 * This is the class of the object types, derived from the type base
54 * class.
55 * The single ObjectType instances define the default values for new
56 * created object entities as given in the definition files.
58 class ObjectType: public Type
60 public:
61 /**
62 * The constructor.
63 * @param name The name of this type (used in editor)
64 * @see Type::Type()
66 ObjectType (const char* name);
71 /**
72 * Object kingdom class
74 class ObjectKingdom: public Kingdom
76 public:
77 /**
78 * The constructor.
80 ObjectKingdom ();
85 // Virtual methods
88 /**
89 * Creates a new ObjectEntity object.
90 * @param type The ID of the type which the new object should be
91 * @see ObjectEntity::ObjectEntity()
93 Entity*
94 createEntity (ID type);
96 /**
97 * Creates a new ObjectType object.
98 * @param name The name of this type
99 * @see ObjectType::ObjectType()
101 Type*
102 createType (const char* name);
105 #endif /* STRANDED_OBJECT_HH */