diff options
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/tests.utils.h | 1 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/dependencies.h | 3 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/packagespec.h | 23 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/sourceparagraph.h | 9 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/statusparagraphs.h | 5 |
5 files changed, 39 insertions, 2 deletions
diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h index b23abe4eb..970506663 100644 --- a/toolsrc/include/tests.utils.h +++ b/toolsrc/include/tests.utils.h @@ -20,6 +20,7 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework std::unique_ptr<vcpkg::StatusParagraph> make_status_pgh(const char* name, const char* depends = "", + const char* default_features = "", const char* triplet = "x86-windows"); std::unique_ptr<vcpkg::StatusParagraph> make_status_feature_pgh(const char* name, const char* feature, diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 014f004a2..4abeb678e 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -151,7 +151,8 @@ namespace vcpkg::Dependencies PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db); ~PackageGraph(); - void install(const FeatureSpec& spec) const; + void install(const FeatureSpec& spec, + const std::unordered_set<std::string>& prevent_default_features = {}) const; void upgrade(const PackageSpec& spec) const; std::vector<AnyAction> serialize() const; diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index f1119e2f3..0a4347639 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -15,6 +15,12 @@ namespace vcpkg static ExpectedT<ParsedSpecifier, PackageSpecParseResult> from_string(const std::string& input); }; + /// + /// <summary> + /// Full specification of a package. Contains all information to reference + /// a specific package. + /// </summary> + /// struct PackageSpec { static ExpectedT<PackageSpec, PackageSpecParseResult> from_name_and_triplet(const std::string& name, @@ -46,6 +52,12 @@ namespace vcpkg Triplet m_triplet; }; + /// + /// <summary> + /// Full specification of a feature. Contains all information to reference + /// a single feature in a specific package. + /// </summary> + /// struct FeatureSpec { FeatureSpec(const PackageSpec& spec, const std::string& feature) : m_spec(spec), m_feature(feature) {} @@ -82,6 +94,12 @@ namespace vcpkg std::string m_feature; }; + /// + /// <summary> + /// Full specification of a package. Contains all information to reference + /// a collection of features in a single package. + /// </summary> + /// struct FullPackageSpec { PackageSpec package_spec; @@ -93,6 +111,11 @@ namespace vcpkg const Triplet& default_triplet); }; + /// + /// <summary> + /// Contains all information to reference a collection of features in a single package by their names. + /// </summary> + /// struct Features { std::string name; diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index dcbbc1c3b..ea8e27a94 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -29,6 +29,9 @@ namespace vcpkg std::string to_string(const Dependency& dep); + /// <summary> + /// Port metadata of additional feature in a package (part of CONTROL file) + /// </summary> struct FeatureParagraph { std::string name; @@ -37,7 +40,7 @@ namespace vcpkg }; /// <summary> - /// Port metadata (CONTROL file) + /// Port metadata of the core feature of a package (part of CONTROL file) /// </summary> struct SourceParagraph { @@ -49,6 +52,10 @@ namespace vcpkg std::vector<Dependency> depends; std::vector<std::string> default_features; }; + + /// <summary> + /// Full metadata of a package: core and other features. + /// </summary> struct SourceControlFile { static Parse::ParseExpected<SourceControlFile> parse_control_file( diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h index fd33f8094..b3eec266a 100644 --- a/toolsrc/include/vcpkg/statusparagraphs.h +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -6,6 +6,11 @@ namespace vcpkg { + /// <summary>Status paragraphs</summary> + /// + /// Collection of <see cref="vcpkg::StatusParagraph"/>, e.g. contains the information + /// about whether a package is installed or not. + /// struct StatusParagraphs { StatusParagraphs(); |
