You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
422 B
23 lines
422 B
#pragma once
|
|
typedef unsigned char Byte;
|
|
|
|
class CArrayBuffer {
|
|
public:
|
|
CArrayBuffer(int byteLength = 8) {
|
|
this->_byteLenght = byteLength;
|
|
this->pData = new Byte[this->_byteLenght];
|
|
}
|
|
~CArrayBuffer() {
|
|
if (this->pData != nullptr) {
|
|
delete[] this->pData;
|
|
this->pData = nullptr;
|
|
}
|
|
}
|
|
int byteLength() {
|
|
return this->_byteLenght;
|
|
}
|
|
public:
|
|
Byte *pData;
|
|
private:
|
|
int _byteLenght;
|
|
};
|