| 181 | } |
| 182 | |
| 183 | void ConfigurationManager::LoadConfigurationsPath(const LayerManager &layers) { |
| 184 | const std::vector<Path> &configuration_files = ::CollectFilePaths(Path(Path::CONFIGS)); |
| 185 | for (std::size_t i = 0, n = configuration_files.size(); i < n; ++i) { |
| 186 | Configuration configuration; |
| 187 | const bool result = configuration.Load(configuration_files[i], layers); |
| 188 | if (!result) { |
| 189 | continue; |
| 190 | } |
| 191 | |
| 192 | if (this->FindConfiguration(configuration.key) != nullptr) { |
| 193 | continue; |
| 194 | } |
| 195 | |
| 196 | /* |
| 197 | std::string missing_layer; |
| 198 | if (!HasMissingLayer(configuration.parameters, layers, missing_layer)) { |
| 199 | //OrderParameter(configuration.parameters, layers); |
| 200 | } |
| 201 | */ |
| 202 | |
| 203 | available_configurations.push_back(configuration); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | static Path MakeConfigurationPath(const std::string &key) { return RelativePath(Path::CONFIGS) + "/" + key + ".json"; } |
| 208 |
no test coverage detected