chigraph  master
Systems programming language written for beginners in LLVM
Fetcher.hpp
Go to the documentation of this file.
1 
3 #ifndef CHI_FETCHER_HPP
4 #define CHI_FETCHER_HPP
5 
6 #pragma once
7 
8 #include <chi/Support/Result.hpp>
9 
10 #include <boost/filesystem/path.hpp>
11 
12 namespace chi {
13 
14 // Version control types
15 enum class VCSType {
16  // Git
17  Git,
18 
19  // TODO: implement more
20  Unknown
21 
22 };
30 Result fetchModule(const boost::filesystem::path& workspacePath,
31  const boost::filesystem::path& name, bool recursive);
32 
36 std::tuple<VCSType, std::string, std::string> resolveUrlFromModuleName(
37  const boost::filesystem::path& path);
38 }
39 
40 #endif // CHI_FETCHER_HPP
Defines the Result class and related functions.
Result fetchModule(const boost::filesystem::path &workspacePath, const boost::filesystem::path &name, bool recursive)
Downloads a module from a remote URL, currently supports.
The namespace where chigraph lives.
std::tuple< VCSType, std::string, std::string > resolveUrlFromModuleName(const boost::filesystem::path &path)
Get the URL for a VCS repository from a module name.
Definition: Fetcher.cpp:303