blob: 9299ed323b1382a3e3880a224c963d380027a16d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include "api/resource.h"
#include <memory>
#include <string>
class ResourceFactory {
public:
template<typename T>
static std::unique_ptr<crepe::api::Resource> create_resource(const std::string& file_path){
return std::make_unique<T>(convert_file_to_string(file_path));
}
private:
static std::string convert_file_to_string(const std::string& path);
};
|