#ifndef SPINSCALE_TEST_SUPPORT_BAKED_DEVICE_CATALOG_H #define SPINSCALE_TEST_SUPPORT_BAKED_DEVICE_CATALOG_H #include #include #include #include #include namespace sscl::tests { inline std::vector profilesForMachine(const char *machineTag) { std::vector matches; for (std::size_t i = 0; i < test_fixtures::bakedCameraProfileCount; ++i) { const test_fixtures::BakedCameraProfile& profile = test_fixtures::bakedCameraProfiles[i]; if (std::string(profile.machineTag) == machineTag) { matches.push_back(&profile); } } return matches; } inline std::optional findProfileByTag(const char *machineTag, const char *profileTag) { for (std::size_t i = 0; i < test_fixtures::bakedCameraProfileCount; ++i) { const test_fixtures::BakedCameraProfile& profile = test_fixtures::bakedCameraProfiles[i]; if (std::string(profile.machineTag) == machineTag && std::string(profile.profileTag) == profileTag) { return &profile; } } return std::nullopt; } inline std::vector requiredProfilesForMachine(const char *machineTag) { std::vector matches; for (std::size_t i = 0; i < test_fixtures::bakedCameraProfileCount; ++i) { const test_fixtures::BakedCameraProfile& profile = test_fixtures::bakedCameraProfiles[i]; if (std::string(profile.machineTag) == machineTag && profile.requiredOnMachine) { matches.push_back(&profile); } } return matches; } } // namespace sscl::tests #endif // SPINSCALE_TEST_SUPPORT_BAKED_DEVICE_CATALOG_H