File size: 1,147 Bytes
2492322 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | // Copyright (c) 2019, QuantStack and Mamba Contributors
//
// Distributed under the terms of the BSD 3-Clause License.
//
// The full license is in the file LICENSE, distributed with this software.
#ifndef MAMBA_SOLVER_LIBSOLV_SOLVER_HPP
#define MAMBA_SOLVER_LIBSOLV_SOLVER_HPP
#include "mamba/core/error_handling.hpp"
#include "mamba/solver/libsolv/parameters.hpp"
#include "mamba/solver/libsolv/unsolvable.hpp"
#include "mamba/solver/request.hpp"
#include "mamba/solver/solution.hpp"
namespace mamba::solver::libsolv
{
class Database;
class Solver
{
public:
using Outcome = std::variant<Solution, UnSolvable>;
[[nodiscard]] auto
solve(Database& database, Request&& request, MatchSpecParser ms_parser = MatchSpecParser::Mixed)
-> expected_t<Outcome>;
[[nodiscard]] auto
solve(Database& database, const Request& request, MatchSpecParser ms_parser = MatchSpecParser::Mixed)
-> expected_t<Outcome>;
private:
auto solve_impl(Database& database, const Request& request, MatchSpecParser ms_parser)
-> expected_t<Outcome>;
};
}
#endif
|