MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / joinTriggerGroup

Method joinTriggerGroup

src/Core/Triggers/TriggerManager.cpp:73–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 }
72
73 TriggerGroupPtr TriggerManager::joinTriggerGroup(
74 const std::string& space, const std::string& group)
75 {
76 Debug::Log->debug(
77 "<TriggerManager> Joining TriggerGroup {0} in Namespace {1}", group, space);
78 if (m_allTriggers.find(space) != m_allTriggers.end())
79 {
80 if (m_allTriggers[space].find(group) != m_allTriggers[space].end()
81 && m_allTriggers[space][group].lock()->isJoinable())
82 return TriggerGroupPtr(m_allTriggers[space][group].lock());
83 if (m_allTriggers[space].find(group) != m_allTriggers[space].end())
84 {
85 throw Exceptions::TriggerGroupNotJoinable(space, group, EXC_INFO);
86 }
87 auto& selectedNamespace = m_allTriggers[space];
88 std::vector<std::string> triggerGroupNames(selectedNamespace.size());
89 std::transform(selectedNamespace.begin(), selectedNamespace.end(),
90 triggerGroupNames.begin(), [](const auto& pair) { return pair.first; });
91 throw Exceptions::UnknownTriggerGroup(
92 space, group, triggerGroupNames, EXC_INFO);
93 }
94 std::vector<std::string> namespaces(m_allTriggers.size());
95 std::transform(m_allTriggers.begin(), m_allTriggers.end(), namespaces.begin(),
96 [](const auto& pair) { return pair.first; });
97 throw Exceptions::UnknownTriggerNamespace(space, namespaces, EXC_INFO);
98 }
99
100 void TriggerManager::removeNamespace(const std::string& space)
101 {

Callers

nothing calls this directly

Calls 10

UnknownTriggerGroupClass · 0.85
debugMethod · 0.80
isJoinableMethod · 0.80
lockMethod · 0.80
findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected