aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg_Dependencies.h41
1 files changed, 14 insertions, 27 deletions
diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h
index 155fb12e6..f35250447 100644
--- a/toolsrc/include/vcpkg_Dependencies.h
+++ b/toolsrc/include/vcpkg_Dependencies.h
@@ -7,15 +7,6 @@
namespace vcpkg::Dependencies
{
- struct AnyParagraph
- {
- std::vector<PackageSpec> dependencies(const Triplet& triplet) const;
-
- Optional<StatusParagraph> status_paragraph;
- Optional<BinaryParagraph> binary_paragraph;
- Optional<SourceParagraph> source_paragraph;
- };
-
enum class RequestType
{
UNKNOWN,
@@ -25,6 +16,15 @@ namespace vcpkg::Dependencies
std::string to_output_string(RequestType request_type, const CStringView s);
+ struct AnyParagraph
+ {
+ std::vector<PackageSpec> dependencies(const Triplet& triplet) const;
+
+ Optional<StatusParagraph> status_paragraph;
+ Optional<BinaryParagraph> binary_paragraph;
+ Optional<SourceParagraph> source_paragraph;
+ };
+
enum class InstallPlanType
{
UNKNOWN,
@@ -57,36 +57,23 @@ namespace vcpkg::Dependencies
REMOVE
};
- struct SpecAndRemovePlanType
- {
- PackageSpec spec;
- RemovePlanType plan_type;
- };
-
struct RemovePlanAction
{
+ static bool compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right);
+
RemovePlanAction();
- RemovePlanAction(const RemovePlanType& plan_type, const RequestType& request_type);
+ RemovePlanAction(const PackageSpec& spec, const RemovePlanType& plan_type, const RequestType& request_type);
RemovePlanAction(const RemovePlanAction&) = delete;
RemovePlanAction(RemovePlanAction&&) = default;
RemovePlanAction& operator=(const RemovePlanAction&) = delete;
RemovePlanAction& operator=(RemovePlanAction&&) = default;
+ PackageSpec spec;
RemovePlanType plan_type;
RequestType request_type;
};
- struct PackageSpecWithRemovePlan
- {
- static bool compare_by_name(const PackageSpecWithRemovePlan* left, const PackageSpecWithRemovePlan* right);
-
- PackageSpecWithRemovePlan(const PackageSpec& spec, RemovePlanAction&& plan);
-
- PackageSpec spec;
- RemovePlanAction plan;
- };
-
std::vector<InstallPlanAction> create_install_plan(const VcpkgPaths& paths, const std::vector<PackageSpec>& specs, const StatusParagraphs& status_db);
- std::vector<PackageSpecWithRemovePlan> create_remove_plan(const std::vector<PackageSpec>& specs, const StatusParagraphs& status_db);
+ std::vector<RemovePlanAction> create_remove_plan(const std::vector<PackageSpec>& specs, const StatusParagraphs& status_db);
}