mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 04:33:53 +08:00
b788c2b209
Use fmap instead of construct/insert. Don't cache VS2015 instances since it is called once. Add ParagraphDataMap alias.
27 lines
995 B
C++
27 lines
995 B
C++
#pragma once
|
|
|
|
#include "filesystem_fs.h"
|
|
#include <map>
|
|
#include "vcpkg_expected.h"
|
|
#include "BinaryParagraph.h"
|
|
#include "vcpkg_paths.h"
|
|
#include "version_t.h"
|
|
|
|
namespace vcpkg::Paragraphs
|
|
{
|
|
using ParagraphDataMap = std::unordered_map<std::string, std::string>;
|
|
|
|
expected<ParagraphDataMap> get_single_paragraph(const fs::path& control_path);
|
|
expected<std::vector<ParagraphDataMap>> get_paragraphs(const fs::path& control_path);
|
|
expected<ParagraphDataMap> parse_single_paragraph(const std::string& str);
|
|
expected<std::vector<ParagraphDataMap>> parse_paragraphs(const std::string& str);
|
|
|
|
expected<SourceParagraph> try_load_port(const fs::path& control_path);
|
|
|
|
expected<BinaryParagraph> try_load_cached_package(const vcpkg_paths& paths, const package_spec& spec);
|
|
|
|
std::vector<SourceParagraph> load_all_ports(const fs::path& ports_dir);
|
|
|
|
std::map<std::string, version_t> extract_port_names_and_versions(const std::vector<SourceParagraph>& source_paragraphs);
|
|
}
|