SlHelpers
Loading...
Searching...
No Matches
SupportedConf.h
1// SPDX-License-Identifier: GPL-2.0-only
2
3#pragma once
4
5#include <string>
6#include <utility>
7#include <vector>
8
9namespace SlKernCVS {
10
14class SupportedConf {
15public:
18 NonPresent = -3,
19 Unsupported = -2,
20 UnsupportedOptional = -1,
21 Unspecified = 0,
22 Supported = 1,
23 BaseSupported = 2,
24 ExternallySupported = 3,
25 KMPSupported = 4,
26 };
27
28 SupportedConf() = delete;
29
34 SupportedConf(std::string_view conf);
35
41 SupportState supportState(const std::string &module) const;
42private:
43 void parseLine(std::string_view line) noexcept;
44
45 std::vector<std::pair<std::string, SupportState>> entries;
46};
47
48}
Parses supported.conf and holds/retrieves the information.
Definition SupportedConf.h:14
SupportState
Level of support for a module.
Definition SupportedConf.h:17
SupportState supportState(const std::string &module) const
Find supported state of module.
SupportedConf(std::string_view conf)
Parse conf and store.