vcpkg/toolsrc/include/Paragraphs.h
Robert Schumacher b788c2b209 [vcpkg] ImmutableSortedVector is actually Mutable via move.
Use fmap instead of construct/insert.
Don't cache VS2015 instances since it is called once.
Add ParagraphDataMap alias.
2017-04-01 03:30:52 -07:00

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);
}