27 : m_ServiceRegistration()
28 , m_TrackingDeviceTypeInformations()
34 std::vector<TrackingDeviceTypeInformation*>::iterator iter = m_TrackingDeviceTypeInformations.begin();
36 for (; iter != m_TrackingDeviceTypeInformations.end(); iter++)
41 m_TrackingDeviceTypeInformations.clear();
48 m_ServiceRegistration = context->RegisterService(
this);
53 if (m_ServiceRegistration !=
nullptr) m_ServiceRegistration.Unregister();
54 m_ServiceRegistration = 0;
59 if (typeInformation !=
nullptr)
61 m_TrackingDeviceTypeInformations.push_back(typeInformation);
67 for (
auto deviceType : m_TrackingDeviceTypeInformations)
69 if (deviceType->GetTrackingDeviceName() == type)
80 for (
auto deviceType : m_TrackingDeviceTypeInformations)
82 if (deviceType->GetTrackingDeviceName() == type)
84 return deviceType->m_TrackingDeviceData;
88 return std::vector<TrackingDeviceData>();
93 if (GetDeviceDataForLine(type).empty())
98 return GetDeviceDataForLine(type).front();
103 for (
auto deviceType : m_TrackingDeviceTypeInformations)
105 for (
auto deviceData : deviceType->m_TrackingDeviceData)
107 if (deviceData.Model == modelName)
119 std::vector<std::string> names;
120 for (
auto deviceType : m_TrackingDeviceTypeInformations)
122 names.push_back(deviceType->GetTrackingDeviceName());
TrackingDeviceData GetDeviceDataByName(const std::string &modelName)
std::vector< TrackingDeviceData > GetDeviceDataForLine(TrackingDeviceType type)
TrackingDeviceTypeInformation * GetTrackingDeviceTypeInformation(TrackingDeviceType type)
virtual void UnRegisterMicroservice()
Registers this object as a Microservice, making it available to every module and/or plugin...
TrackingDeviceData GetFirstCompatibleDeviceDataForLine(TrackingDeviceType type)
TrackingDeviceTypeCollection()
std::string TrackingDeviceType
~TrackingDeviceTypeCollection()
void RegisterTrackingDeviceType(TrackingDeviceTypeInformation *typeInformation)
std::vector< std::string > GetTrackingDeviceTypeNames()
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
virtual void RegisterAsMicroservice()
Registers this object as a Microservice, making it available to every module and/or plugin...