Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::USActivator Class Reference

Module activator for the US module. Loads mitk::USVideoDevice objects from hard disk on module load and write them to hard disk on module unload. More...

#include <mitkUSActivator.h>

Inheritance diagram for mitk::USActivator:
Collaboration diagram for mitk::USActivator:

Public Member Functions

 USActivator ()
 
virtual ~USActivator ()
 
void Load (us::ModuleContext *context) override
 The mitk::USVideoDevice obejcts are loaded from hard disk and registered into micro service. More...
 
void Unload (us::ModuleContext *context) override
 Registered mitk::USVideoDevice objects are stored to hard disk an deregistered from micro service. More...
 
- Public Member Functions inherited from us::ModuleActivator
virtual ~ModuleActivator ()
 
virtual void Load (ModuleContext *context)=0
 
virtual void Unload (ModuleContext *context)=0
 

Protected Member Functions

void OnServiceEvent (const us::ServiceEvent event)
 Listens to ServiceRegistry changes and updates the list of mitk::USDevice object accordingly. More...
 

Protected Attributes

us::ModuleContext * m_Context
 
std::vector< USDevice::Pointerm_Devices
 

Detailed Description

Module activator for the US module. Loads mitk::USVideoDevice objects from hard disk on module load and write them to hard disk on module unload.

Pointers to mitk::USDevice objects are held to make sure that they will not be deleted while the module is loaded. A service event listener is registered, so that pointers to devices which are registered into micro service from a plugin for example can be held here, too.

Definition at line 38 of file mitkUSActivator.h.

Constructor & Destructor Documentation

mitk::USActivator::USActivator ( )

Definition at line 20 of file mitkUSActivator.cpp.

mitk::USActivator::~USActivator ( )
virtual

Definition at line 24 of file mitkUSActivator.cpp.

Member Function Documentation

void mitk::USActivator::Load ( us::ModuleContext *  context)
override

The mitk::USVideoDevice obejcts are loaded from hard disk and registered into micro service.

Definition at line 28 of file mitkUSActivator.cpp.

References mitk::USDevicePersistence::New(), us::ServiceConstants::OBJECTCLASS(), and OnServiceEvent().

void mitk::USActivator::OnServiceEvent ( const us::ServiceEvent  event)
protected

Listens to ServiceRegistry changes and updates the list of mitk::USDevice object accordingly.

Definition at line 63 of file mitkUSActivator.cpp.

References us::ServiceEvent::GetType(), MITK_DEBUG, MITK_WARN, us::ServiceEvent::REGISTERED, and us::ServiceEvent::UNREGISTERING.

Referenced by Load(), and Unload().

void mitk::USActivator::Unload ( us::ModuleContext *  context)
override

Registered mitk::USVideoDevice objects are stored to hard disk an deregistered from micro service.

Definition at line 48 of file mitkUSActivator.cpp.

References mitk::USDevicePersistence::New(), and OnServiceEvent().

Member Data Documentation

us::ModuleContext* mitk::USActivator::m_Context
protected

Definition at line 60 of file mitkUSActivator.h.

std::vector<USDevice::Pointer> mitk::USActivator::m_Devices
protected

Definition at line 61 of file mitkUSActivator.h.


The documentation for this class was generated from the following files: