Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
AssetTemplateRegistry.hpp
1#pragma once
2
3#include <string_view>
4#include <filesystem>
5#include <vector>
6
7#include <Common/ResourcePipeline/AssetType.hpp>
8
9namespace Grindstone::Editor {
10 class AssetTemplateRegistry {
11 public:
12 void RegisterTemplate(
13 AssetType assetType,
14 std::string_view name,
15 std::string_view extension,
16 const void* const sourcePtr, size_t sourceSize
17 );
18 void RemoveTemplate(AssetType assetType);
19
21 AssetType assetType = AssetType::Undefined;
22 std::string name;
23 std::string extension;
24 std::vector<char> content;
25
27 AssetType assetType,
28 std::string_view name,
29 std::string_view extension,
30 const void* const sourcePtr,
31 size_t sourceSize
32 );
33 };
34
35 using TemplateList = std::vector<AssetTemplate>;
36
37 virtual TemplateList::iterator begin();
38 virtual TemplateList::const_iterator begin() const;
39 virtual TemplateList::iterator end();
40 virtual TemplateList::const_iterator end() const;
41
42 protected:
43 TemplateList assetTemplates;
44 };
45}
Definition AssetTemplateRegistry.hpp:20