MCPcopy Create free account
hub / github.com/DFHack/dfhack / unregisterAll

Method unregisterAll

library/modules/EventManager.cpp:131–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void DFHack::EventManager::unregisterAll(Plugin* plugin) {
132 DEBUG(log).print("unregistering all handlers for plugin {}\n",
133 plugin ? plugin->getName() : "<null>");
134 for ( auto i = handlers[EventType::TICK].find(plugin); i != handlers[EventType::TICK].end(); i++ ) {
135 if ( (*i).first != plugin )
136 break;
137
138 removeFromTickQueue((*i).second);
139 }
140 for (auto &handler : handlers) {
141 handler.erase(plugin);
142 }
143}
144
145static void manageTickEvent(color_ostream& out);
146static void manageJobInitiatedEvent(color_ostream& out);

Callers

nothing calls this directly

Calls 6

removeFromTickQueueFunction · 0.85
printMethod · 0.45
getNameMethod · 0.45
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected