载入中...
搜索中...
未找到
ByteData.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Data.h"
4
5#include <stddef.h>
6
7namespace eve {
8namespace data {
9
11class ByteData : public eve::Data {
12public:
14 ByteData(size_t size);
16 ByteData(const void *d, size_t size);
18 ByteData(void *d, size_t size, bool own);
20 ByteData(const ByteData &d);
21 virtual ~ByteData();
22
24 ByteData *clone() const override;
25 void *getData() const override;
26 size_t getSize() const override;
27
28private:
29 void create();
30
31 char *data;
32 size_t size;
33
34}; // ByteData
35
36} // namespace data
37} // namespace eve
Light2D::Data * data
int d
In-memory byte buffer implementing eve::Data (ref-counted).
Definition ByteData.h:11
void * getData() const override
Gets a pointer to the data. This pointer will obviously not be valid if the Data object is destroyed.
Definition ByteData.cpp:47
size_t getSize() const override
Gets the size of the Data in bytes.
Definition ByteData.cpp:49
virtual ~ByteData()
Definition ByteData.cpp:33
ByteData * clone() const override
Implements eve::Data.
Definition ByteData.cpp:45
Definition Build.cpp:11