34 m_Devices = devicePersistence->RestoreLastDevices();
37 for (std::vector<mitk::USDevice::Pointer>::iterator it = m_Devices.begin();
38 it != m_Devices.end(); ++it)
57 devicePersistence->StoreCurrentDevices();
60 m_Devices.erase(m_Devices.begin(), m_Devices.end());
67 MITK_WARN(
"us::ModuleActivator")(
"USActivator")
68 <<
"OnServiceEvent listener called without having a module context in "
69 <<
"the activator. Cannot handle event.";
80 m_Devices.push_back(device.GetPointer());
85 std::vector<mitk::USDevice::Pointer>::iterator it = find(m_Devices.begin(), m_Devices.end(), device.GetPointer());
86 if (it != m_Devices.end()) { m_Devices.erase(it); }
90 MITK_DEBUG(
"us::ModuleActivator")(
"USActivator")
91 <<
"Received uninteresting service event: " << event.
GetType();
itk::SmartPointer< Self > Pointer
void Load(us::ModuleContext *context) override
The mitk::USVideoDevice obejcts are loaded from hard disk and registered into micro service...
void OnServiceEvent(const us::ServiceEvent event)
Listens to ServiceRegistry changes and updates the list of mitk::USDevice object accordingly.
void Unload(us::ModuleContext *context) override
Registered mitk::USVideoDevice objects are stored to hard disk an deregistered from micro service...
US_Core_EXPORT const std::string & OBJECTCLASS()