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

Method createTriggerGroup

src/Core/Triggers/TriggerManager.cpp:51–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 8

loadGameObjectMethod · 0.80
CursorMethod · 0.80
createTriggerGroupsMethod · 0.80
initMethod · 0.80
initTriggersMethod · 0.80
SceneMethod · 0.80
NetworkHandlerMethod · 0.80
TcpServerMethod · 0.80

Calls 8

removeTriggerGroupMethod · 0.95
debugMethod · 0.80
findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected