| 49 | } |
| 50 | |
| 51 | TriggerGroupPtr TriggerManager::createTriggerGroup( |
| 52 | const std::string& space, const std::string& group) |
| 53 | { |
| 54 | Debug::Log->debug( |
| 55 | "<TriggerManager> Creating TriggerGroup {0} in Namespace {1}", group, space); |
| 56 | if (m_allTriggers.find(space) != m_allTriggers.end()) |
| 57 | { |
| 58 | if (m_allTriggers[space].find(group) == m_allTriggers[space].end()) |
| 59 | { |
| 60 | TriggerGroupPtr newGroup(new TriggerGroup(m_lua, space, group), |
| 61 | [this](TriggerGroup* ptr) { this->removeTriggerGroup(ptr); }); |
| 62 | m_allTriggers[space][group] = newGroup; |
| 63 | return newGroup; |
| 64 | } |
| 65 | throw Exceptions::TriggerGroupAlreadyExists(space, group, EXC_INFO); |
| 66 | } |
| 67 | std::vector<std::string> namespaces(m_allTriggers.size()); |
| 68 | std::transform(m_allTriggers.begin(), m_allTriggers.end(), namespaces.begin(), |
| 69 | [](const auto& pair) { return pair.first; }); |
| 70 | throw Exceptions::UnknownTriggerNamespace(space, namespaces, EXC_INFO); |
| 71 | } |
| 72 | |
| 73 | TriggerGroupPtr TriggerManager::joinTriggerGroup( |
| 74 | const std::string& space, const std::string& group) |
no test coverage detected