annotate engine/core/model/metamodel/object.h @ 562:e34b44afd428

Fixed the built in pychan dialogs as they didin't work at all. Updated the editor to support modal execution and now use the pychan dialog message boxes for displaying some error messages.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 24 Jun 2010 19:58:59 +0000
parents 7e5717105212
children
rev   line source
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
1 /***************************************************************************
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
2 * Copyright (C) 2005-2008 by the FIFE team *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
3 * http://www.fifengine.de *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
4 * This file is part of FIFE. *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
5 * *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
6 * FIFE is free software; you can redistribute it and/or *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
7 * modify it under the terms of the GNU Lesser General Public *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
8 * License as published by the Free Software Foundation; either *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
9 * version 2.1 of the License, or (at your option) any later version. *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
10 * *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
11 * This library is distributed in the hope that it will be useful, *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
14 * Lesser General Public License for more details. *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
15 * *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
16 * You should have received a copy of the GNU Lesser General Public *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
17 * License along with this library; if not, write to the *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
18 * Free Software Foundation, Inc., *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
20 ***************************************************************************/
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
21
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
22 #ifndef FIFE_PROTOTYPE_H
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
23 #define FIFE_PROTOTYPE_H
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
24
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
25 // Standard C++ library includes
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
26 #include <string>
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
27 #include <map>
306
6177cdf72489 - added new method to object class: getActionIds()
chewie@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 267
diff changeset
28 #include <list>
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
29
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
30 // 3rd party library includes
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
31
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
32 // FIFE includes
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
33 // These includes are split up in two parts, separated by one empty line
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
34 // First block: files included from the FIFE root src directory
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
35 // Second block: files included from the same folder
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
36 #include "util/base/resourceclass.h"
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
37 #include "util/math/angles.h"
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
38
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
39 namespace FIFE {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
40
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
41 class Action;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
42 class AbstractPather;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
43 class AbstractVisual;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
44
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
45 /** Object class
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
46 *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
47 * Objects describe the properties of objects.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
48 * Objects may inherit default values from another object.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
49 *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
50 */
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
51 class Object : public ResourceClass {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
52 public:
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
53 /** Constructor
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
54 * An object may optionally inherit default attributes
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
55 * from another object. This object may override these
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
56 * defaults, but it may not CHANGE the inherited values.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
57 *
326
671e22a1cc8d Replaced dataset with Model in documentation for Object. Closes #343
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 306
diff changeset
58 * Objects are created by calling Model::createObject, thus
671e22a1cc8d Replaced dataset with Model in documentation for Object. Closes #343
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 306
diff changeset
59 * this method should really be called only by Model or test code
671e22a1cc8d Replaced dataset with Model in documentation for Object. Closes #343
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 306
diff changeset
60 * @see Model in model/model.h for creation of objects.
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
61 */
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
62 Object(const std::string& identifier, const std::string& name_space, Object* inherited=NULL);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
63
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
64 /** Destructor
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
65 */
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
66 ~Object();
306
6177cdf72489 - added new method to object class: getActionIds()
chewie@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 267
diff changeset
67
267
8eec4c078223 * Removed ObjectLoader as it was both unused and unusable (Closes #353)
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
68 const std::string& getId() const { return m_id; }
8eec4c078223 * Removed ObjectLoader as it was both unused and unusable (Closes #353)
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
69 const std::string& getNamespace() const { return m_namespace; }
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
70
340
7e5717105212 * Added setId to Layer, Map, Object and Camera
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 326
diff changeset
71 /** Sets the identifier for this object.
7e5717105212 * Added setId to Layer, Map, Object and Camera
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 326
diff changeset
72 */
7e5717105212 * Added setId to Layer, Map, Object and Camera
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 326
diff changeset
73 void setId(const std::string& id) { m_id = id; }
7e5717105212 * Added setId to Layer, Map, Object and Camera
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 326
diff changeset
74
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
75 /** Adds new action with given id. In case there is action already
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
76 * with given id, returns it instead of new object
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
77 * Action instances are managed by object
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
78 * @param is_default if true, becomes default action for this object
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
79 * default objects are used e.g. when showing them on editor.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
80 * if multiple default actions are created, last one remains.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
81 * In case there's no explicit default action created, first
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
82 * action created becomes the default
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
83 */
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
84 Action* createAction(const std::string& identifier, bool is_default=false);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
85
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
86 /** Gets action with given id. If not found, returns NULL
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
87 */
267
8eec4c078223 * Removed ObjectLoader as it was both unused and unusable (Closes #353)
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
88 Action* getAction(const std::string& identifier) const;
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
89
306
6177cdf72489 - added new method to object class: getActionIds()
chewie@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 267
diff changeset
90 /** Gets all available action ids of the object and packs them into a list
6177cdf72489 - added new method to object class: getActionIds()
chewie@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 267
diff changeset
91 */
6177cdf72489 - added new method to object class: getActionIds()
chewie@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 267
diff changeset
92 std::list<std::string> getActionIds() const;
6177cdf72489 - added new method to object class: getActionIds()
chewie@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 267
diff changeset
93
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
94 /** Gets default action assigned to this object. If none available, returns NULL
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
95 */
267
8eec4c078223 * Removed ObjectLoader as it was both unused and unusable (Closes #353)
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
96 Action* getDefaultAction() const { return m_defaultaction; }
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
97
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
98 /** Sets pather used by instances created out of this object
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
99 */
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
100 void setPather(AbstractPather* pather);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
101
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
102 /** Gets associated pather
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
103 */
267
8eec4c078223 * Removed ObjectLoader as it was both unused and unusable (Closes #353)
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
104 AbstractPather* getPather() const { return m_pather; }
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
105
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
106 /** Gets an object where this object was inherited from
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
107 * @see inherited object
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
108 */
267
8eec4c078223 * Removed ObjectLoader as it was both unused and unusable (Closes #353)
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
109 Object* getInherited() const { return m_inherited; }
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
110
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
111 /** Sets visualization to be used. Transfers ownership.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
112 */
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
113 void adoptVisual(AbstractVisual* visual) { m_visual = visual; }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
114
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
115 /** Gets used visualization
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
116 */
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
117 template<typename T> T* getVisual() const { return reinterpret_cast<T*>(m_visual); }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
118
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
119 /** Sets if object blocks movement
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
120 */
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
121 void setBlocking(bool blocking) { m_blocking = blocking; }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
122
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
123 /** Gets if object blocks movement
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
124 */
267
8eec4c078223 * Removed ObjectLoader as it was both unused and unusable (Closes #353)
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
125 bool isBlocking() const;
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
126
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
127 /** Set to true, if object is such that it doesn't move
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
128 */
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
129 void setStatic(bool stat) { m_static = stat; }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
130
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
131 /** Gets if object moves
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
132 */
267
8eec4c078223 * Removed ObjectLoader as it was both unused and unusable (Closes #353)
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
133 bool isStatic() const;
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
134
267
8eec4c078223 * Removed ObjectLoader as it was both unused and unusable (Closes #353)
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
135 bool operator==(const Object& obj) const;
8eec4c078223 * Removed ObjectLoader as it was both unused and unusable (Closes #353)
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 46
diff changeset
136 bool operator!=(const Object& obj) const;
306
6177cdf72489 - added new method to object class: getActionIds()
chewie@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 267
diff changeset
137
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
138 private:
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
139 std::string m_id;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
140 std::string m_namespace;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
141 Object* m_inherited;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
142 std::map<std::string, Action*>* m_actions;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
143 bool m_blocking;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
144 bool m_static;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
145 AbstractPather* m_pather;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
146 AbstractVisual* m_visual;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
147 Action* m_defaultaction;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
148 };
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
149
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
150 } //FIFE
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
151 #endif
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
152