2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2023-02-14 10:19:05 +00:00
|
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/utilities/debug_settings_reader.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2022-05-17 19:04:23 +00:00
|
|
|
#include <cstdint>
|
2019-02-27 11:39:32 +01:00
|
|
|
#include <map>
|
2017-12-21 00:45:38 +01:00
|
|
|
#include <string>
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2023-08-20 04:31:48 +00:00
|
|
|
enum class DebugVarPrefix : uint8_t;
|
|
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
class SettingsFileReader : public SettingsReader {
|
|
|
|
|
public:
|
2023-07-17 14:21:17 +00:00
|
|
|
SettingsFileReader(const char *filePath);
|
2017-12-21 00:45:38 +01:00
|
|
|
~SettingsFileReader() override;
|
2023-08-20 04:31:48 +00:00
|
|
|
int32_t getSetting(const char *settingName, int32_t defaultValue, DebugVarPrefix &type) override;
|
2017-12-21 00:45:38 +01:00
|
|
|
int32_t getSetting(const char *settingName, int32_t defaultValue) override;
|
2023-08-20 04:31:48 +00:00
|
|
|
int64_t getSetting(const char *settingName, int64_t defaultValue, DebugVarPrefix &type) override;
|
2020-03-27 07:47:16 +01:00
|
|
|
int64_t getSetting(const char *settingName, int64_t defaultValue) override;
|
2023-08-20 04:31:48 +00:00
|
|
|
bool getSetting(const char *settingName, bool defaultValue, DebugVarPrefix &type) override;
|
2017-12-21 00:45:38 +01:00
|
|
|
bool getSetting(const char *settingName, bool defaultValue) override;
|
2023-08-20 04:31:48 +00:00
|
|
|
std::string getSetting(const char *settingName, const std::string &value, DebugVarPrefix &type) override;
|
2017-12-21 00:45:38 +01:00
|
|
|
std::string getSetting(const char *settingName, const std::string &value) override;
|
2018-10-10 16:02:19 +02:00
|
|
|
const char *appSpecificLocation(const std::string &name) override;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
protected:
|
2019-03-02 08:27:21 +01:00
|
|
|
void parseStream(std::istream &inputStream);
|
2017-12-21 00:45:38 +01:00
|
|
|
std::map<std::string, std::string> settingStringMap;
|
|
|
|
|
};
|
2019-03-26 11:59:46 +01:00
|
|
|
}; // namespace NEO
|