From 250e30d73f09e9da2b5a81d0fbae63744ae12a73 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 2 Apr 2019 08:47:15 +0800 Subject: *misc --- source/libs/asura-lib-utils/io/decoded_data.h | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 source/libs/asura-lib-utils/io/decoded_data.h (limited to 'source/libs/asura-lib-utils/io/decoded_data.h') diff --git a/source/libs/asura-lib-utils/io/decoded_data.h b/source/libs/asura-lib-utils/io/decoded_data.h new file mode 100644 index 0000000..e201e91 --- /dev/null +++ b/source/libs/asura-lib-utils/io/decoded_data.h @@ -0,0 +1,42 @@ +#ifndef __ASURA_ENGINE_DATA_H__ +#define __ASURA_ENGINE_DATA_H__ + +#include + +#include "../scripting/portable.hpp" + +#include "data_buffer.h" + +namespace AsuraEngine +{ + namespace IO + { + + /// + /// 可以在另一个线程构建的data继承此类。如图片数据、音频数据等,可以在另一个线程中解析原文件,生成内部数据格式,如像素 + /// 等。 + /// + ASURA_ABSTRACT class DecodedData + { + public: + + /// + /// 从内存中构建data,可以放在另一个线程里面,从资源管理系统里面加载。 + /// + DecodedData(const DataBuffer& databuffer); + + virtual ~DecodedData(); + + protected: + + /// + /// 解码内存中的数据。 + /// + virtual void Decode(const DataBuffer& buffer) = 0; + + }; + + } +} + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0