mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-17 10:17:59 -05:00
Unlinker/ObjLoading: Add skeleton for dynamically loading search paths based on current zone
This commit is contained in:
@ -6,19 +6,41 @@
|
||||
class SearchPaths final : public ISearchPath
|
||||
{
|
||||
std::vector<ISearchPath*> m_search_paths;
|
||||
std::vector<ISearchPath*> m_to_free;
|
||||
|
||||
public:
|
||||
using iterator = std::vector<ISearchPath*>::iterator;
|
||||
|
||||
SearchPaths();
|
||||
~SearchPaths() override;
|
||||
|
||||
FileAPI::IFile* Open(const std::string& fileName) override;
|
||||
void FindAll(std::function<void(const std::string&)> callback) override;
|
||||
void FindAllOnDisk(std::function<void(const std::string&)> callback) override;
|
||||
void FindByExtension(const std::string& extension, std::function<void(const std::string&)> callback) override;
|
||||
void FindOnDiskByExtension(const std::string& extension, 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;
|
||||
|
||||
void AddSearchPath(ISearchPath* searchPath);
|
||||
/**
|
||||
* \brief Adds a search path that gets deleted upon destruction of the \c SearchPaths object.
|
||||
* \param searchPath The search path to add.
|
||||
*/
|
||||
void CommitSearchPath(ISearchPath* searchPath);
|
||||
|
||||
/**
|
||||
* \brief Adds a search path that does \b NOT get deleted upon destruction of the \c SearchPaths object.
|
||||
* \param searchPath The search path to add.
|
||||
*/
|
||||
void IncludeSearchPath(ISearchPath* searchPath);
|
||||
|
||||
/**
|
||||
* \brief Removes a search path from the \c SearchPaths object. If the search path was committed then it will \b NOT be deleted when destructing the \c SearchPaths object.
|
||||
* \param searchPath The search path to remove.
|
||||
*/
|
||||
void RemoveSearchPath(ISearchPath* searchPath);
|
||||
|
||||
iterator begin();
|
||||
|
Reference in New Issue
Block a user