Mercurial > fife-parpg
comparison engine/core/model/metamodel/object.i @ 306:6177cdf72489
- added new method to object class: getActionIds()
- cleanup to *.i file (replaced redundant code by including header file)
FEATURES:
- objects can now provide a list of action ids of all actions they were set up with
author | chewie@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 08 Aug 2009 14:24:35 +0000 |
parents | 8eec4c078223 |
children |
comparison
equal
deleted
inserted
replaced
305:e25cfb3fe58e | 306:6177cdf72489 |
---|---|
24 #include "model/metamodel/object.h" | 24 #include "model/metamodel/object.h" |
25 %} | 25 %} |
26 | 26 |
27 %include "util/base/utilbase.i" | 27 %include "util/base/utilbase.i" |
28 %include "model/metamodel/abstractvisual.i" | 28 %include "model/metamodel/abstractvisual.i" |
29 | 29 %include "model/metamodel/object.h" |
30 namespace FIFE { | |
31 | |
32 class Action; | |
33 class AbstractPather; | |
34 | |
35 class Object : public ResourceClass { | |
36 public: | |
37 Object(const std::string& identifier, const std::string& name_space, Object* inherited=NULL); | |
38 ~Object(); | |
39 | |
40 const std::string& getId() const { return m_id; } | |
41 const std::string& getNamespace() const { return m_namespace; } | |
42 | |
43 Action* createAction(const std::string& identifier, bool is_default=false); | |
44 Action* getAction(const std::string& identifier) const; | |
45 Action* getDefaultAction() const { return m_defaultaction; } | |
46 | |
47 void setPather(AbstractPather* pather); | |
48 AbstractPather* getPather() const { return m_pather; } | |
49 | |
50 Object* getInherited() const { return m_inherited; } | |
51 void adoptVisual(AbstractVisual* visual) { m_visual = visual; } | |
52 template<typename T> T* getVisual() const { return reinterpret_cast<T*>(m_visual); } | |
53 | |
54 void setBlocking(bool blocking) { m_blocking = blocking; } | |
55 bool isBlocking() const; | |
56 | |
57 void setStatic(bool stat) { m_static = stat; } | |
58 bool isStatic() const; | |
59 | |
60 bool operator==(const Object& obj) const; | |
61 bool operator!=(const Object& obj) const; | |
62 | |
63 }; | |
64 } |