-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbuffer.hpp
More file actions
45 lines (36 loc) · 820 Bytes
/
dbuffer.hpp
File metadata and controls
45 lines (36 loc) · 820 Bytes
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
45
#ifndef __DESTRUCT_DBUFFER__
#define __DESTRUCT_DBUFFER__
#include "destruct.hpp" //export
#include "dpolicy.hpp"
#include <stdint.h>
#include <string.h>
namespace Destruct
{
class RealBuffer : public RefcountPolicy<RealBuffer>
{
public:
friend class RefcountPolicy<RealBuffer>;
RealBuffer();
RealBuffer(int32_t size_);
RealBuffer(uint8_t* data_, int32_t size_);
RealBuffer(RealBuffer const& copy);
uint8_t* data;
uint32_t size;
protected:
virtual ~RealBuffer();
};
class EXPORT DBuffer //handler
{
public:
DBuffer();//must not be used
DBuffer(int32_t size);//allocate buff for reuse
DBuffer(uint8_t* data , int32_t size);
DBuffer(DBuffer const& copy);
~DBuffer();
uint8_t* data(void);
int32_t size(void);
private:
RealBuffer* __realBuffer;
};
}
#endif