mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-02-10 17:43:03 +00:00
chore: add abstraction for opening output files to be able to mock it
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
#include "Asset/IAssetPostProcessor.h"
|
||||
#include "Asset/ZoneDefinitionContext.h"
|
||||
#include "Image/IPak/IPakCreator.h"
|
||||
|
||||
#include <filesystem>
|
||||
#include "SearchPath/IOutputPath.h"
|
||||
|
||||
class AbstractImageIPakPostProcessor : public IAssetPostProcessor
|
||||
{
|
||||
@@ -12,7 +11,7 @@ public:
|
||||
AbstractImageIPakPostProcessor(const ZoneDefinitionContext& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
ZoneAssetCreationStateContainer& zoneStates,
|
||||
const std::filesystem::path& outDir);
|
||||
IOutputPath& outDir);
|
||||
|
||||
static bool AppliesToZoneDefinition(const ZoneDefinitionContext& zoneDefinition);
|
||||
|
||||
@@ -25,7 +24,7 @@ private:
|
||||
const ZoneDefinitionContext& m_zone_definition;
|
||||
ISearchPath& m_search_path;
|
||||
IPakCreator& m_ipak_creator;
|
||||
const std::filesystem::path& m_out_dir;
|
||||
IOutputPath& m_out_dir;
|
||||
|
||||
unsigned m_obj_container_index;
|
||||
IPakToCreate* m_current_ipak;
|
||||
@@ -41,7 +40,7 @@ public:
|
||||
ImageIPakPostProcessor(const ZoneDefinitionContext& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
ZoneAssetCreationStateContainer& zoneStates,
|
||||
const std::filesystem::path& outDir)
|
||||
IOutputPath& outDir)
|
||||
: AbstractImageIPakPostProcessor(zoneDefinition, searchPath, zoneStates, outDir)
|
||||
{
|
||||
}
|
||||
@@ -49,5 +48,5 @@ public:
|
||||
[[nodiscard]] asset_type_t GetHandlingAssetType() const override
|
||||
{
|
||||
return AssetType::EnumEntry;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user