summaryrefslogtreecommitdiff
path: root/Source/Asura.Engine/FileSystem/ResourceManager.h
blob: e22ce912e7a6d9c7424d9600bcba17881c106def (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __ASURA_ENGINE_RESOURCE_MANAGER_H__
#define __ASURA_ENGINE_RESOURCE_MANAGER_H__

#include <string>

#include "DataBuffer.h"
#include "Scripting/Portable.h"

namespace AsuraEngine
{
	namespace Filesystem
	{

		///
		/// Դء洢ԴָĿ¼ȡ
		///
		class ResourceManager ASURA_FINAL
		{
		public:

			ResourceManager();
			~ResourceManager(); 

			///
			/// װظĿ¼
			///
			void Mount(const std::string& root);

			///
			/// ȡļһdata bufferעҪȷȷڴ棬ڵôʹunique_ptr
			/// 
			DataBuffer* LoadFile(const std::string& path);

			///
			/// data buffer
			///
			void SaveFile(const std::string& path, const DataBuffer* buffer);

		};

	}
}

#endif