Open search paths for assets, gdts and source in Linker

This commit is contained in:
Jan
2021-03-10 12:26:09 +01:00
parent 8c7926e745
commit c47ea48b6b
6 changed files with 370 additions and 112 deletions

View File

@ -2,37 +2,6 @@
#include <filesystem>
SearchPaths::SearchPaths() = default;
SearchPaths::~SearchPaths()
= default;
SearchPaths::SearchPaths(const SearchPaths& other)
: m_search_paths(other.m_search_paths)
{
}
SearchPaths::SearchPaths(SearchPaths&& other) noexcept
: m_search_paths(std::move(other.m_search_paths))
{
}
SearchPaths& SearchPaths::operator=(const SearchPaths& other)
{
m_search_paths = other.m_search_paths;
return *this;
}
SearchPaths& SearchPaths::operator=(SearchPaths&& other) noexcept
{
m_search_paths = std::move(other.m_search_paths);
return *this;
}
std::unique_ptr<std::istream> SearchPaths::Open(const std::string& fileName)
{
for(auto* searchPathEntry : m_search_paths)

View File

@ -12,17 +12,17 @@ class SearchPaths final : public ISearchPath
public:
using iterator = std::vector<ISearchPath*>::iterator;
SearchPaths();
~SearchPaths() override;
SearchPaths() = default;
~SearchPaths() override = default;
std::unique_ptr<std::istream> Open(const std::string& fileName) override;
std::string GetPath() override;
void Find(const SearchPathSearchOptions& options, const std::function<void(const std::string&)>& callback) override;
SearchPaths(const SearchPaths& other);
SearchPaths(SearchPaths&& other) noexcept;
SearchPaths& operator=(const SearchPaths& other);
SearchPaths& operator=(SearchPaths&& other) noexcept;
SearchPaths(const SearchPaths& other) = delete;
SearchPaths(SearchPaths&& other) noexcept = default;
SearchPaths& operator=(const SearchPaths& other) = delete;
SearchPaths& operator=(SearchPaths&& other) noexcept = default;
/**
* \brief Adds a search path that gets deleted upon destruction of the \c SearchPaths object.