MCPcopy Create free account
hub / github.com/MITK/MITK / Stop

Method Stop

Modules/CppMicroServices/src/usModule.cpp:172–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void Module::Stop()
173{
174 if (d->moduleContext == nullptr)
175 {
176 MITK_WARN << "Module " << d->info.name << " already stopped.";
177 return;
178 }
179
180 try
181 {
182 d->coreCtx->listeners.ModuleChanged(ModuleEvent(ModuleEvent::UNLOADING, this));
183
184 if (d->moduleActivator)
185 {
186 d->moduleActivator->Unload(d->moduleContext);
187 }
188 }
189 catch (...)
190 {
191 MITK_WARN << "Calling the module activator Unload() method of " << d->info.name << " failed!";
192
193 try
194 {
195 this->Uninit();
196 }
197 catch (...) {}
198
199 throw;
200 }
201
202 this->Uninit();
203}
204
205ModuleContext* Module::GetModuleContext() const
206{

Callers 1

UnRegisterMethod · 0.45

Calls 4

UninitMethod · 0.95
ModuleEventClass · 0.70
ModuleChangedMethod · 0.45
UnloadMethod · 0.45

Tested by

no test coverage detected