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

Method AddingService

Modules/CppMicroServices/src/usServiceHooks.cpp:36–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36ServiceHooks::TrackedType ServiceHooks::AddingService(const ServiceReferenceType& reference)
37{
38 ServiceListenerHook* lh = GetModuleContext()->GetService(reference);
39 try
40 {
41 lh->Added(coreCtx->listeners.GetListenerInfoCollection());
42 }
43 catch (const std::exception& e)
44 {
45 MITK_WARN << "Failed to call listener hook #" << reference.GetProperty(ServiceConstants::SERVICE_ID()).ToString()
46 << ": " << e.what();
47 }
48 catch (...)
49 {
50 MITK_WARN << "Failed to call listener hook #" << reference.GetProperty(ServiceConstants::SERVICE_ID()).ToString()
51 << ": unknown exception type";
52 }
53 return lh;
54}
55
56void ServiceHooks::ModifiedService(const ServiceReferenceType& /*reference*/, TrackedType /*service*/)
57{

Callers

nothing calls this directly

Calls 7

GetModuleContextFunction · 0.85
whatMethod · 0.80
GetServiceMethod · 0.45
AddedMethod · 0.45
ToStringMethod · 0.45
GetPropertyMethod · 0.45

Tested by

no test coverage detected