MCPcopy Create free account
hub / github.com/SeisSol/SeisSol / _registerHook

Method _registerHook

src/Modules/Modules.cpp:53–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51namespace seissol {
52
53void Modules::_registerHook(Module& module, ModuleHook hook, ModulePriority priority) {
54 assert(static_cast<int>(hook) < static_cast<int>(ModuleHook::MaxHooks));
55
56 if (nextHook >= ModuleHook::MaxInitHooks) {
57 logError() << "Trying to register for a hook after initialization phase";
58 }
59 if (hook < nextHook) {
60 logError() << "Trying to register for hook" << strHook(hook)
61 << "but SeisSol was already processing"
62 << strHook(static_cast<ModuleHook>(static_cast<int>(nextHook) - 1));
63 }
64
65 hooks[static_cast<size_t>(hook)].insert(std::pair<ModulePriority, Module*>(priority, &module));
66}
67
68const char* Modules::strHook(ModuleHook hook) {
69 switch (hook) {

Callers 1

registerHookMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected