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

Function findDevices

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

Source from the content-addressed store, hash-verified

79}
80
81std::vector<std::shared_ptr<Device>> findDevices(const std::function<bool(const std::shared_ptr<Device>&)>& filterFunction) {
82 auto scoped_mutex = mutex.asScopedLock();
83 scoped_mutex.lock();
84
85 auto devices_view = getDevices() | std::views::filter([&filterFunction](auto& device) {
86 return filterFunction(device);
87 });
88 return toVector(devices_view);
89}
90
91std::shared_ptr<Device> findDevice(const std::function<bool(const std::shared_ptr<Device>&)>& filterFunction) {
92 auto scoped_mutex = mutex.asScopedLock();

Callers 1

tpagerInitFunction · 0.50

Calls 5

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

Tested by

no test coverage detected