mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 23:08:05 -05:00
35 lines
842 B
C++
35 lines
842 B
C++
#pragma once
|
|
|
|
#include "Asset/IZoneAssetCreationState.h"
|
|
#include "SearchPath/IOutputPath.h"
|
|
#include "SearchPath/ISearchPath.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
class IwdToCreate
|
|
{
|
|
public:
|
|
explicit IwdToCreate(std::string name);
|
|
|
|
void AddFile(std::string filePath);
|
|
void Build(ISearchPath& searchPath, IOutputPath& outPath);
|
|
[[nodiscard]] const std::vector<std::string>& GetFilePaths() const;
|
|
|
|
private:
|
|
std::string m_name;
|
|
std::vector<std::string> m_file_paths;
|
|
};
|
|
|
|
class IwdCreator final : public IZoneAssetCreationState
|
|
{
|
|
public:
|
|
IwdToCreate* GetOrAddIwd(const std::string& iwdName);
|
|
void Finalize(ISearchPath& searchPath, IOutputPath& outPath);
|
|
|
|
private:
|
|
std::unordered_map<std::string, IwdToCreate*> m_iwd_lookup;
|
|
std::vector<std::unique_ptr<IwdToCreate>> m_iwds;
|
|
};
|