vcpkg/toolsrc/include/Paragraphs.h

27 lines
992 B
C
Raw Normal View History

2016-11-08 08:06:36 +08:00
#pragma once
2016-11-30 10:08:53 +08:00
#include "filesystem_fs.h"
#include <map>
2017-04-01 07:33:10 +08:00
#include "vcpkg_expected.h"
#include "BinaryParagraph.h"
#include "vcpkg_paths.h"
2017-04-04 07:13:46 +08:00
#include "VersionT.h"
2016-11-08 08:06:36 +08:00
2017-01-06 06:25:50 +08:00
namespace vcpkg::Paragraphs
2016-11-08 08:06:36 +08:00
{
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);
2017-04-04 05:45:00 +08:00
expected<BinaryParagraph> try_load_cached_package(const vcpkg_paths& paths, const PackageSpec& spec);
std::vector<SourceParagraph> load_all_ports(const fs::path& ports_dir);
2017-04-04 07:13:46 +08:00
std::map<std::string, VersionT> extract_port_names_and_versions(const std::vector<SourceParagraph>& source_paragraphs);
2017-01-06 06:25:50 +08:00
}