comparison engine/core/model/metamodel/object.cpp @ 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
92 } 92 }
93 return NULL; 93 return NULL;
94 } 94 }
95 return i->second; 95 return i->second;
96 } 96 }
97
98 std::list<std::string> Object::getActionIds() const {
99 std::list<std::string> action_ids;
100 action_ids.clear();
101 if (m_actions) {
102 std::map<std::string, Action*>::const_iterator actions_it = m_actions->begin();
103 for(; actions_it != m_actions->end(); ++actions_it) {
104 action_ids.push_back(actions_it->first);
105 }
106 }
107 return action_ids;
108 }
97 109
98 void Object::setPather(AbstractPather* pather) { 110 void Object::setPather(AbstractPather* pather) {
99 m_pather = pather; 111 m_pather = pather;
100 } 112 }
101 113
124 } 136 }
125 137
126 bool Object::operator!=(const Object& obj) const { 138 bool Object::operator!=(const Object& obj) const {
127 return m_id != obj.getId() || m_namespace != obj.getNamespace(); 139 return m_id != obj.getId() || m_namespace != obj.getNamespace();
128 } 140 }
141
129 } 142 }