mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-18 18:57:57 -05:00
chore: add abstraction for opening output files to be able to mock it
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "Asset/IZoneAssetCreationState.h"
|
||||
#include "SearchPath/IOutputPath.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
@ -14,18 +14,18 @@ public:
|
||||
explicit IwdToCreate(std::string name);
|
||||
|
||||
void AddFile(std::string filePath);
|
||||
void Build(ISearchPath& searchPath, const std::filesystem::path& outPath);
|
||||
void Build(ISearchPath& searchPath, IOutputPath& outPath);
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
std::vector<std::string> m_file_paths;
|
||||
};
|
||||
|
||||
class IwdCreator : public IZoneAssetCreationState
|
||||
class IwdCreator final : public IZoneAssetCreationState
|
||||
{
|
||||
public:
|
||||
IwdToCreate* GetOrAddIwd(const std::string& iwdName);
|
||||
void Finalize(ISearchPath& searchPath, const std::filesystem::path& outPath);
|
||||
void Finalize(ISearchPath& searchPath, IOutputPath& outPath);
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, IwdToCreate*> m_iwd_lookup;
|
||||
|
Reference in New Issue
Block a user