diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-03 14:45:00 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-04 16:44:41 -0700 |
| commit | d1141e6054ffde134d1a3d80d484d2d2b959e408 (patch) | |
| tree | b2ed7b12aed3d35082ef28ff44c6165b07fdd091 /toolsrc/include/package_spec.h | |
| parent | 1c1423014f5aab77339ebcb261e1d33e3106ec5d (diff) | |
| download | vcpkg-d1141e6054ffde134d1a3d80d484d2d2b959e408.tar.gz vcpkg-d1141e6054ffde134d1a3d80d484d2d2b959e408.zip | |
package_spec -> PackageSpec
Diffstat (limited to 'toolsrc/include/package_spec.h')
| -rw-r--r-- | toolsrc/include/package_spec.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/toolsrc/include/package_spec.h b/toolsrc/include/package_spec.h deleted file mode 100644 index ead05cb99..000000000 --- a/toolsrc/include/package_spec.h +++ /dev/null @@ -1,58 +0,0 @@ -#pragma once -#include "package_spec_parse_result.h" -#include "triplet.h" -#include "vcpkg_expected.h" - -namespace vcpkg -{ - struct package_spec - { - static expected<package_spec> from_string(const std::string& spec_as_string, const triplet& default_target_triplet); - - static expected<package_spec> from_name_and_triplet(const std::string& name, const triplet& target_triplet); - - const std::string& name() const; - - const triplet& target_triplet() const; - - std::string display_name() const; - - std::string dir() const; - - std::string toString() const; - - private: - std::string m_name; - triplet m_target_triplet; - }; - - std::string to_printf_arg(const package_spec& spec); - - bool operator==(const package_spec& left, const package_spec& right); - - std::ostream& operator<<(std::ostream& os, const package_spec& spec); -} //namespace vcpkg - -namespace std -{ - template <> - struct hash<vcpkg::package_spec> - { - size_t operator()(const vcpkg::package_spec& value) const - { - size_t hash = 17; - hash = hash * 31 + std::hash<std::string>()(value.name()); - hash = hash * 31 + std::hash<vcpkg::triplet>()(value.target_triplet()); - return hash; - } - }; - - template <> - struct equal_to<vcpkg::package_spec> - { - bool operator()(const vcpkg::package_spec& left, const vcpkg::package_spec& right) const - { - return left == right; - } - }; -} // namespace std |
