vcpkg/toolsrc/include/SourceParagraph.h
2017-04-04 16:44:42 -07:00

36 lines
865 B
C++

#pragma once
#include <vector>
#include <unordered_map>
namespace vcpkg
{
struct Triplet;
struct Dependency
{
std::string name;
std::string qualifier;
};
std::ostream& operator<<(std::ostream& os, const Dependency& p);
struct SourceParagraph
{
SourceParagraph();
explicit SourceParagraph(std::unordered_map<std::string, std::string> fields);
std::string name;
std::string version;
std::string description;
std::string maintainer;
std::vector<Dependency> depends;
};
std::vector<std::string> filter_dependencies(const std::vector<Dependency>& deps, const Triplet& t);
std::vector<Dependency> expand_qualified_dependencies(const std::vector<std::string>& depends);
std::vector<std::string> parse_depends(const std::string& depends_string);
}