2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-07-06 19:21:52 +00:00

chore: add abstraction for opening output files to be able to mock it

This commit is contained in:
Jan
2025-01-07 00:02:38 +01:00
parent cacccf64e1
commit e0f8b3d3ca
25 changed files with 202 additions and 68 deletions

View File

@ -22,7 +22,7 @@ namespace
const ZoneDefinitionContext& zoneDefinition,
ISearchPath& searchPath,
ZoneAssetCreationStateContainer& zoneStates,
const fs::path& outDir)
IOutputPath& outDir)
{
auto& memory = *zone.GetMemory();
@ -37,8 +37,8 @@ void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
ISearchPath& searchPath,
IGdtQueryable& gdt,
ZoneAssetCreationStateContainer& zoneStates,
const fs::path& outDir,
const fs::path& cacheDir) const
IOutputPath& outDir,
IOutputPath& cacheDir) const
{
ConfigurePostProcessors(collection, zone, zoneDefinition, searchPath, zoneStates, outDir);
}

View File

@ -13,7 +13,7 @@ namespace IW3
ISearchPath& searchPath,
IGdtQueryable& gdt,
ZoneAssetCreationStateContainer& zoneStates,
const std::filesystem::path& outDir,
const std::filesystem::path& cacheDir) const override;
IOutputPath& outDir,
IOutputPath& cacheDir) const override;
};
} // namespace IW3

View File

@ -22,7 +22,7 @@ namespace
const ZoneDefinitionContext& zoneDefinition,
ISearchPath& searchPath,
ZoneAssetCreationStateContainer& zoneStates,
const fs::path& outDir)
IOutputPath& outDir)
{
auto& memory = *zone.GetMemory();
@ -37,8 +37,8 @@ void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
ISearchPath& searchPath,
IGdtQueryable& gdt,
ZoneAssetCreationStateContainer& zoneStates,
const fs::path& outDir,
const fs::path& cacheDir) const
IOutputPath& outDir,
IOutputPath& cacheDir) const
{
ConfigurePostProcessors(collection, zone, zoneDefinition, searchPath, zoneStates, outDir);
}

View File

@ -13,7 +13,7 @@ namespace IW4
ISearchPath& searchPath,
IGdtQueryable& gdt,
ZoneAssetCreationStateContainer& zoneStates,
const std::filesystem::path& outDir,
const std::filesystem::path& cacheDir) const override;
IOutputPath& outDir,
IOutputPath& cacheDir) const override;
};
} // namespace IW4

View File

@ -22,7 +22,7 @@ namespace
const ZoneDefinitionContext& zoneDefinition,
ISearchPath& searchPath,
ZoneAssetCreationStateContainer& zoneStates,
const fs::path& outDir)
IOutputPath& outDir)
{
auto& memory = *zone.GetMemory();
@ -37,8 +37,8 @@ void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
ISearchPath& searchPath,
IGdtQueryable& gdt,
ZoneAssetCreationStateContainer& zoneStates,
const fs::path& outDir,
const fs::path& cacheDir) const
IOutputPath& outDir,
IOutputPath& cacheDir) const
{
ConfigurePostProcessors(collection, zone, zoneDefinition, searchPath, zoneStates, outDir);
}

View File

@ -13,7 +13,7 @@ namespace IW5
ISearchPath& searchPath,
IGdtQueryable& gdt,
ZoneAssetCreationStateContainer& zoneStates,
const std::filesystem::path& outDir,
const std::filesystem::path& cacheDir) const override;
IOutputPath& outDir,
IOutputPath& cacheDir) const override;
};
} // namespace IW5

View File

@ -22,7 +22,7 @@ namespace
const ZoneDefinitionContext& zoneDefinition,
ISearchPath& searchPath,
ZoneAssetCreationStateContainer& zoneStates,
const fs::path& outDir)
IOutputPath& outDir)
{
auto& memory = *zone.GetMemory();
@ -37,8 +37,8 @@ void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
ISearchPath& searchPath,
IGdtQueryable& gdt,
ZoneAssetCreationStateContainer& zoneStates,
const fs::path& outDir,
const fs::path& cacheDir) const
IOutputPath& outDir,
IOutputPath& cacheDir) const
{
ConfigurePostProcessors(collection, zone, zoneDefinition, searchPath, zoneStates, outDir);
}

View File

@ -13,7 +13,7 @@ namespace T5
ISearchPath& searchPath,
IGdtQueryable& gdt,
ZoneAssetCreationStateContainer& zoneStates,
const std::filesystem::path& outDir,
const std::filesystem::path& cacheDir) const override;
IOutputPath& outDir,
IOutputPath& cacheDir) const override;
};
} // namespace T5

View File

@ -28,7 +28,7 @@ namespace
const ZoneDefinitionContext& zoneDefinition,
ISearchPath& searchPath,
ZoneAssetCreationStateContainer& zoneStates,
const fs::path& outDir)
IOutputPath& outDir)
{
auto& memory = *zone.GetMemory();
@ -46,8 +46,8 @@ void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
ISearchPath& searchPath,
IGdtQueryable& gdt,
ZoneAssetCreationStateContainer& zoneStates,
const fs::path& outDir,
const fs::path& cacheDir) const
IOutputPath& outDir,
IOutputPath& cacheDir) const
{
ConfigureCompilers(collection, zone, zoneDefinition, searchPath, zoneStates);
ConfigurePostProcessors(collection, zone, zoneDefinition, searchPath, zoneStates, outDir);

View File

@ -13,7 +13,7 @@ namespace T6
ISearchPath& searchPath,
IGdtQueryable& gdt,
ZoneAssetCreationStateContainer& zoneStates,
const std::filesystem::path& outDir,
const std::filesystem::path& cacheDir) const override;
IOutputPath& outDir,
IOutputPath& cacheDir) const override;
};
} // namespace T6