Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
ImporterManager.hpp
1#pragma once
2
3#include <Editor/AssetRegistry.hpp>
4#include <EngineCore/Assets/AssetManager.hpp>
5#include <filesystem>
6#include <map>
7#include <string>
8
9namespace Grindstone::Importers {
11 public:
12 using ImporterFactory = void(*)(Grindstone::Editor::AssetRegistry& assetRegistry, Grindstone::Assets::AssetManager& assetManger, const std::filesystem::path&);
13
15 bool Import(const std::filesystem::path& path);
16 void AddImporterFactory(const std::string& extension, ImporterFactory importerToAdd);
17 void RemoveImporterFactoryByExtension(const std::string& extension);
18 bool HasImporter(const std::string& extension) const;
19 bool HasImporter(const std::filesystem::path& path) const;
20 ImporterFactory GetImporterFactoryByExtension(const std::string& extension) const;
21 ImporterFactory GetImporterFactoryByPath(const std::filesystem::path& path) const;
22 private:
23 std::map<std::string, ImporterFactory> extensionsToImporterFactories;
24 };
25}
Definition AssetManager.hpp:15
Definition AssetRegistry.hpp:14
Definition ImporterManager.hpp:10