aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/fabricator/resource_fabricator.h
blob: 2b0030d1b6339811c9b2fbb5f421499cfd225f35 (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);

};