aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_available_commands.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-01-12 17:35:33 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2017-01-12 17:43:05 -0800
commitdf2a05e8546281135c6ea12430734d74371bcf46 (patch)
treef64c97d48fbcb506def9b089cc4311736dcf08de /toolsrc/src/commands_available_commands.cpp
parent4c51e65d5004311c7c7ba0687e7dba934ba986c1 (diff)
downloadvcpkg-df2a05e8546281135c6ea12430734d74371bcf46.tar.gz
vcpkg-df2a05e8546281135c6ea12430734d74371bcf46.zip
Introduce Command namespace. Refactoring
Diffstat (limited to 'toolsrc/src/commands_available_commands.cpp')
-rw-r--r--toolsrc/src/commands_available_commands.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/toolsrc/src/commands_available_commands.cpp b/toolsrc/src/commands_available_commands.cpp
new file mode 100644
index 000000000..f78416aed
--- /dev/null
+++ b/toolsrc/src/commands_available_commands.cpp
@@ -0,0 +1,44 @@
+#include "vcpkg_Commands.h"
+
+namespace vcpkg::Commands
+{
+ const std::vector<package_name_and_function<command_type_a>>& get_available_commands_type_a()
+ {
+ static std::vector<package_name_and_function<command_type_a>> t = {
+ {"install", install_command},
+ {"remove", remove_command},
+ {"build", build_command},
+ {"build_external", build_external_command}
+ };
+ return t;
+ }
+
+ const std::vector<package_name_and_function<command_type_b>>& get_available_commands_type_b()
+ {
+ static std::vector<package_name_and_function<command_type_b>> t = {
+ {"/?", help_command},
+ {"help", help_command},
+ {"search", search_command},
+ {"list", list_command},
+ {"integrate", integrate_command},
+ {"owns", owns_command},
+ {"update", update_command},
+ {"edit", edit_command},
+ {"create", create_command},
+ {"import", import_command},
+ {"cache", cache_command},
+ {"portsdiff", portsdiff_command}
+ };
+ return t;
+ }
+
+ const std::vector<package_name_and_function<command_type_c>>& get_available_commands_type_c()
+ {
+ static std::vector<package_name_and_function<command_type_c>> t = {
+ {"version", &version_command},
+ {"contact", &contact_command},
+ {"hash", &hash_command},
+ };
+ return t;
+ }
+}