#pragma once #include "BinaryParagraph.h" #include "VcpkgPaths.h" #include "VersionT.h" #include "filesystem_fs.h" #include "vcpkg_expected.h" #include namespace vcpkg::Paragraphs { using ParagraphDataMap = std::unordered_map; Expected get_single_paragraph(const Files::Filesystem& fs, const fs::path& control_path); Expected> get_paragraphs(const Files::Filesystem& fs, const fs::path& control_path); Expected parse_single_paragraph(const std::string& str); Expected> parse_paragraphs(const std::string& str); ExpectedT try_load_port(const Files::Filesystem& fs, const fs::path& control_path); Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec); struct LoadResults { std::vector paragraphs; std::vector errors; }; LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); std::map extract_port_names_and_versions( const std::vector& source_paragraphs); }