30 #include "util/base/exception.h"
34 #include "abstractpather.h"
39 m_namespace(name_space),
40 m_inherited(inherited),
46 m_defaultaction(NULL) {
51 std::map<std::string, Action*>::const_iterator i(m_actions->begin());
52 while (i != m_actions->end()) {
63 m_actions =
new std::map<std::string, Action*>;
66 std::map<std::string, Action*>::const_iterator it = m_actions->begin();
67 for(; it != m_actions->end(); ++it) {
68 if(identifier == it->second->getId()) {
69 throw NameClash(identifier);
75 a =
new Action(identifier);
76 (*m_actions)[identifier] = a;
77 if (is_default || (!m_defaultaction)) {
85 std::map<std::string, Action*>::const_iterator i;
87 i = m_actions->find(identifier);
89 if ((!m_actions) || (i == m_actions->end())) {
91 return m_inherited->
getAction(identifier);
99 std::list<std::string> action_ids;
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);
134 bool Object::operator==(
const Object& obj)
const {
135 return m_id == obj.getId() && m_namespace == obj.getNamespace();
138 bool Object::operator!=(
const Object& obj)
const {
139 return m_id != obj.getId() || m_namespace != obj.getNamespace();