diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2020-08-01 13:45:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-01 13:45:17 -0700 |
| commit | 54ec974afefae1864b423335ba8bcb64291d2317 (patch) | |
| tree | 24443f5bcb949a06aa5edef8850a7e633baa6a6f /toolsrc/include | |
| parent | 00e44369cb23f911821ee96888cbb4785810ba07 (diff) | |
| download | vcpkg-54ec974afefae1864b423335ba8bcb64291d2317.tar.gz vcpkg-54ec974afefae1864b423335ba8bcb64291d2317.zip | |
[vcpkg] Refactor commands 2: Electric Boogaloo (#12641)
* Add BasicCommand and VersionCommand
* Add ContactCommand
* test get_available_commands_type_c
* Change get_available_commands_type_c to return objects
* Add TripletCommand & InstallCommand
* Add SetInstalledCommand
* add linking tests
* Add CICommand
* Add remaining *Command objects
* Add tests for commands_type_a
* Move over to using const TripletCommand* for commands_type_a
* Add PathsCommand
* Add SearchCommand
* add test for commands_type_b
* add *Command for all type b commands
* Switch from function pointers to PathsCommand for everything
* format
* rename get_available_commands
also remove CommandType* types
Diffstat (limited to 'toolsrc/include')
31 files changed, 196 insertions, 20 deletions
diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 0fac8222c..83d797fd1 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -6,6 +6,7 @@ #include <vcpkg/base/system.process.h> #include <vcpkg/cmakevars.h> +#include <vcpkg/commands.integrate.h> #include <vcpkg/packagespec.h> #include <vcpkg/statusparagraphs.h> #include <vcpkg/triplet.h> @@ -346,4 +347,11 @@ namespace vcpkg::Build bool m_compiler_tracking; }; + + struct BuildCommand : Commands::TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.autocomplete.h b/toolsrc/include/vcpkg/commands.autocomplete.h index 52998b110..4f518d0f0 100644 --- a/toolsrc/include/vcpkg/commands.autocomplete.h +++ b/toolsrc/include/vcpkg/commands.autocomplete.h @@ -5,4 +5,9 @@ namespace vcpkg::Commands::Autocomplete { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct AutocompleteCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.buildexternal.h b/toolsrc/include/vcpkg/commands.buildexternal.h index 1e3da99db..b4e1aa669 100644 --- a/toolsrc/include/vcpkg/commands.buildexternal.h +++ b/toolsrc/include/vcpkg/commands.buildexternal.h @@ -5,4 +5,11 @@ namespace vcpkg::Commands::BuildExternal { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); + + struct BuildExternalCommand : TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.cache.h b/toolsrc/include/vcpkg/commands.cache.h index 0f48c4eb7..5d18a3f99 100644 --- a/toolsrc/include/vcpkg/commands.cache.h +++ b/toolsrc/include/vcpkg/commands.cache.h @@ -5,4 +5,9 @@ namespace vcpkg::Commands::Cache { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct CacheCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.ci.h b/toolsrc/include/vcpkg/commands.ci.h index e153c1fde..4657741c9 100644 --- a/toolsrc/include/vcpkg/commands.ci.h +++ b/toolsrc/include/vcpkg/commands.ci.h @@ -6,4 +6,11 @@ namespace vcpkg::Commands::CI { extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); + + struct CICommand : TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.ciclean.h b/toolsrc/include/vcpkg/commands.ciclean.h index bf5c3a736..ed9e2f005 100644 --- a/toolsrc/include/vcpkg/commands.ciclean.h +++ b/toolsrc/include/vcpkg/commands.ciclean.h @@ -5,4 +5,9 @@ namespace vcpkg::Commands::CIClean { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct CICleanCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.contact.h b/toolsrc/include/vcpkg/commands.contact.h index 079d68626..f0af41c14 100644 --- a/toolsrc/include/vcpkg/commands.contact.h +++ b/toolsrc/include/vcpkg/commands.contact.h @@ -7,4 +7,9 @@ namespace vcpkg::Commands::Contact extern const CommandStructure COMMAND_STRUCTURE; const std::string& email(); void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem& fs); + + struct ContactCommand : BasicCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem& fs) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.create.h b/toolsrc/include/vcpkg/commands.create.h index 5a6a70889..a8eb99b27 100644 --- a/toolsrc/include/vcpkg/commands.create.h +++ b/toolsrc/include/vcpkg/commands.create.h @@ -7,4 +7,9 @@ namespace vcpkg::Commands::Create extern const CommandStructure COMMAND_STRUCTURE; int perform(const VcpkgCmdArguments& args, const VcpkgPaths& paths); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct CreateCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.dependinfo.h b/toolsrc/include/vcpkg/commands.dependinfo.h index 573cf297a..81301b6d9 100644 --- a/toolsrc/include/vcpkg/commands.dependinfo.h +++ b/toolsrc/include/vcpkg/commands.dependinfo.h @@ -6,4 +6,11 @@ namespace vcpkg::Commands::DependInfo { extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); + + struct DependInfoCommand : TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.edit.h b/toolsrc/include/vcpkg/commands.edit.h index f1a2109cf..9a37d2ee3 100644 --- a/toolsrc/include/vcpkg/commands.edit.h +++ b/toolsrc/include/vcpkg/commands.edit.h @@ -6,4 +6,9 @@ namespace vcpkg::Commands::Edit { extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct EditCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.env.h b/toolsrc/include/vcpkg/commands.env.h index 69ff543d2..5ba58d081 100644 --- a/toolsrc/include/vcpkg/commands.env.h +++ b/toolsrc/include/vcpkg/commands.env.h @@ -6,4 +6,11 @@ namespace vcpkg::Commands::Env { extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); + + struct EnvCommand : TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.fetch.h b/toolsrc/include/vcpkg/commands.fetch.h index 08d4f4351..c41965903 100644 --- a/toolsrc/include/vcpkg/commands.fetch.h +++ b/toolsrc/include/vcpkg/commands.fetch.h @@ -5,4 +5,9 @@ namespace vcpkg::Commands::Fetch { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct FetchCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.format-manifest.h b/toolsrc/include/vcpkg/commands.format-manifest.h index 20e126846..1317bbc70 100644 --- a/toolsrc/include/vcpkg/commands.format-manifest.h +++ b/toolsrc/include/vcpkg/commands.format-manifest.h @@ -6,4 +6,9 @@ namespace vcpkg::Commands::FormatManifest { extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct FormatManifestCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 3a682b091..948d4b5e8 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -11,10 +11,6 @@ namespace vcpkg::Commands { - using CommandTypeA = void (*)(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); - using CommandTypeB = void (*)(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - using CommandTypeC = void (*)(const VcpkgCmdArguments& args, Files::Filesystem& fs); - template<class T> struct PackageNameAndFunction { @@ -22,12 +18,12 @@ namespace vcpkg::Commands T function; }; - Span<const PackageNameAndFunction<CommandTypeA>> get_available_commands_type_a(); - Span<const PackageNameAndFunction<CommandTypeB>> get_available_commands_type_b(); - Span<const PackageNameAndFunction<CommandTypeC>> get_available_commands_type_c(); + Span<const PackageNameAndFunction<const BasicCommand*>> get_available_basic_commands(); + Span<const PackageNameAndFunction<const PathsCommand*>> get_available_paths_commands(); + Span<const PackageNameAndFunction<const TripletCommand*>> get_available_triplet_commands(); template<typename T> - T find(const std::string& command_name, const std::vector<PackageNameAndFunction<T>> available_commands) + T find(StringView command_name, Span<const PackageNameAndFunction<T>> available_commands) { for (const PackageNameAndFunction<T>& cmd : available_commands) { diff --git a/toolsrc/include/vcpkg/commands.hash.h b/toolsrc/include/vcpkg/commands.hash.h index 8cb42ff30..aa9b11c05 100644 --- a/toolsrc/include/vcpkg/commands.hash.h +++ b/toolsrc/include/vcpkg/commands.hash.h @@ -5,4 +5,9 @@ namespace vcpkg::Commands::Hash { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct HashCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.integrate.h b/toolsrc/include/vcpkg/commands.integrate.h index a8ca5026b..162f49a3c 100644 --- a/toolsrc/include/vcpkg/commands.integrate.h +++ b/toolsrc/include/vcpkg/commands.integrate.h @@ -9,4 +9,9 @@ namespace vcpkg::Commands::Integrate void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); void append_helpstring(HelpTableFormatter& table); std::string get_helpstring(); + + struct IntegrateCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.interface.h b/toolsrc/include/vcpkg/commands.interface.h index 96745a2fb..10d213522 100644 --- a/toolsrc/include/vcpkg/commands.interface.h +++ b/toolsrc/include/vcpkg/commands.interface.h @@ -10,4 +10,24 @@ namespace vcpkg::Commands No, Yes, }; + + struct BasicCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem& fs) const = 0; + virtual ~BasicCommand() = default; + }; + + struct PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const = 0; + virtual ~PathsCommand() = default; + }; + + struct TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const = 0; + virtual ~TripletCommand() = default; + }; } diff --git a/toolsrc/include/vcpkg/commands.list.h b/toolsrc/include/vcpkg/commands.list.h index 65c22ef9e..77a5f41bd 100644 --- a/toolsrc/include/vcpkg/commands.list.h +++ b/toolsrc/include/vcpkg/commands.list.h @@ -6,4 +6,9 @@ namespace vcpkg::Commands::List { extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct ListCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.owns.h b/toolsrc/include/vcpkg/commands.owns.h index a46e2bd4e..13676b2bd 100644 --- a/toolsrc/include/vcpkg/commands.owns.h +++ b/toolsrc/include/vcpkg/commands.owns.h @@ -6,4 +6,9 @@ namespace vcpkg::Commands::Owns { extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct OwnsCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.porthistory.h b/toolsrc/include/vcpkg/commands.porthistory.h index ee03be206..3ca532532 100644 --- a/toolsrc/include/vcpkg/commands.porthistory.h +++ b/toolsrc/include/vcpkg/commands.porthistory.h @@ -5,4 +5,9 @@ namespace vcpkg::Commands::PortHistory { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct PortHistoryCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.portsdiff.h b/toolsrc/include/vcpkg/commands.portsdiff.h index efa387710..8cd1b094c 100644 --- a/toolsrc/include/vcpkg/commands.portsdiff.h +++ b/toolsrc/include/vcpkg/commands.portsdiff.h @@ -5,4 +5,9 @@ namespace vcpkg::Commands::PortsDiff { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct PortsDiffCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.search.h b/toolsrc/include/vcpkg/commands.search.h index 81c039856..6220a8866 100644 --- a/toolsrc/include/vcpkg/commands.search.h +++ b/toolsrc/include/vcpkg/commands.search.h @@ -6,4 +6,9 @@ namespace vcpkg::Commands::Search { extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct SearchCommand : PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.setinstalled.h b/toolsrc/include/vcpkg/commands.setinstalled.h index 88065be1c..38cd81369 100644 --- a/toolsrc/include/vcpkg/commands.setinstalled.h +++ b/toolsrc/include/vcpkg/commands.setinstalled.h @@ -17,4 +17,11 @@ namespace vcpkg::Commands::SetInstalled DryRun dry_run, const Optional<fs::path>& pkgsconfig_path); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); + + struct SetInstalledCommand : TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.upgrade.h b/toolsrc/include/vcpkg/commands.upgrade.h index 5e6047c13..340a70c97 100644 --- a/toolsrc/include/vcpkg/commands.upgrade.h +++ b/toolsrc/include/vcpkg/commands.upgrade.h @@ -6,4 +6,11 @@ namespace vcpkg::Commands::Upgrade { extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); + + struct UpgradeCommand : TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.version.h b/toolsrc/include/vcpkg/commands.version.h index 1af134b04..0f1717c74 100644 --- a/toolsrc/include/vcpkg/commands.version.h +++ b/toolsrc/include/vcpkg/commands.version.h @@ -8,4 +8,9 @@ namespace vcpkg::Commands::Version const std::string& version(); void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths); void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem& fs); + + struct VersionCommand : BasicCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem& fs) const override; + }; } diff --git a/toolsrc/include/vcpkg/commands.xvsinstances.h b/toolsrc/include/vcpkg/commands.xvsinstances.h index 0ffa67a50..fc7a39b98 100644 --- a/toolsrc/include/vcpkg/commands.xvsinstances.h +++ b/toolsrc/include/vcpkg/commands.xvsinstances.h @@ -2,11 +2,13 @@ #include <vcpkg/commands.interface.h> -namespace vcpkg::Commands +namespace vcpkg::Commands::X_VSInstances { - namespace X_VSInstances + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct VSInstancesCommand : PathsCommand { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/export.h b/toolsrc/include/vcpkg/export.h index 3605081e3..0dd5b1aac 100644 --- a/toolsrc/include/vcpkg/export.h +++ b/toolsrc/include/vcpkg/export.h @@ -1,6 +1,6 @@ #pragma once -#include <vcpkg/vcpkgpaths.h> +#include <vcpkg/commands.interface.h> namespace vcpkg::Export { @@ -9,4 +9,11 @@ namespace vcpkg::Export void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths); + + struct ExportCommand : Commands::TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const override; + }; } diff --git a/toolsrc/include/vcpkg/help.h b/toolsrc/include/vcpkg/help.h index 97bc11864..3e1ef381e 100644 --- a/toolsrc/include/vcpkg/help.h +++ b/toolsrc/include/vcpkg/help.h @@ -1,7 +1,6 @@ #pragma once -#include <vcpkg/vcpkgcmdarguments.h> -#include <vcpkg/vcpkgpaths.h> +#include <vcpkg/commands.interface.h> #include <string> @@ -12,4 +11,9 @@ namespace vcpkg::Help void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); void help_topic_valid_triplet(const VcpkgPaths& paths); + + struct HelpCommand : Commands::PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 2c674e7de..0ba0932e0 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -93,4 +93,11 @@ namespace vcpkg::Install extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); + + struct InstallCommand : Commands::TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const override; + }; } diff --git a/toolsrc/include/vcpkg/remove.h b/toolsrc/include/vcpkg/remove.h index c43bc73c2..f68e8bd9f 100644 --- a/toolsrc/include/vcpkg/remove.h +++ b/toolsrc/include/vcpkg/remove.h @@ -1,8 +1,7 @@ #pragma once +#include <vcpkg/commands.interface.h> #include <vcpkg/dependencies.h> -#include <vcpkg/vcpkgcmdarguments.h> -#include <vcpkg/vcpkgpaths.h> namespace vcpkg::Remove { @@ -23,4 +22,11 @@ namespace vcpkg::Remove void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db); + + struct RemoveCommand : Commands::TripletCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + Triplet default_triplet) const override; + }; } diff --git a/toolsrc/include/vcpkg/update.h b/toolsrc/include/vcpkg/update.h index 6091da778..2c05e489e 100644 --- a/toolsrc/include/vcpkg/update.h +++ b/toolsrc/include/vcpkg/update.h @@ -1,10 +1,9 @@ #pragma once +#include <vcpkg/commands.interface.h> #include <vcpkg/dependencies.h> #include <vcpkg/packagespec.h> #include <vcpkg/statusparagraphs.h> -#include <vcpkg/vcpkgcmdarguments.h> -#include <vcpkg/vcpkgpaths.h> #include <vcpkg/versiont.h> namespace vcpkg::Update @@ -21,4 +20,9 @@ namespace vcpkg::Update const StatusParagraphs& status_db); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + struct UpdateCommand : Commands::PathsCommand + { + virtual void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) const override; + }; } |
