MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / hasDevice

Function hasDevice

Modules/hal-device-module/source/hal/Device.cpp:134–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134bool hasDevice(Device::Type type) {
135 auto scoped_mutex = mutex.asScopedLock();
136 scoped_mutex.lock();
137 auto result_set = getDevices() | std::views::filter([&type](auto& device) {
138 return device->getType() == type;
139 });
140 return !result_set.empty();
141}
142
143}

Callers 3

registerInternalAppsFunction · 0.85
onShowMethod · 0.85
toolbar_createFunction · 0.85

Calls 4

getDevicesFunction · 0.85
asScopedLockMethod · 0.80
lockMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected