SlHelpers
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 
9 namespace SlKernCVS {
10 
15 public:
17  enum SupportState {
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;
42 private:
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 supportState(const std::string &module) const
Find supported state of module.
Definition: Branches.h:15
SupportState
Level of support for a module.
Definition: SupportedConf.h:17