/* * Copyright (C) 2018-2019 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once #include "runtime/os_interface/os_library.h" #include "igfxfmid.h" #include #include #include #include void addSlash(std::string &path); std::vector readBinaryFile(const std::string &fileName); void readFileToVectorOfStrings(std::vector &lines, const std::string &fileName, bool replaceTabs = false); size_t findPos(const std::vector &lines, const std::string &whatToFind); PRODUCT_FAMILY getProductFamilyFromDeviceName(const std::string &deviceName); class MessagePrinter { public: MessagePrinter() = default; MessagePrinter(bool suppressMessages) : suppressMessages(suppressMessages) {} void printf(const char *message) { if (!suppressMessages) { ::printf("%s", message); } } template void printf(const char *format, Args... args) { if (!suppressMessages) { ::printf(format, std::forward(args)...); } } private: bool suppressMessages = false; };