forked from RaviDesai/mysqlwrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Binary.h
31 lines (26 loc) · 772 Bytes
/
Binary.h
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
#pragma once
#include <string>
namespace MySQLWrap {
class Binary {
public:
Binary();
Binary(size_t bufferSize);
Binary(unsigned char *buffer, size_t bufferLength, size_t bufferSize);
Binary(Binary ©);
virtual ~Binary();
Binary &operator=(const Binary &equal);
void ResizeBuffer(size_t newSize);
void AssignDataToBuffer(unsigned char *data, size_t dataLength);
void SubsumeBuffer(unsigned char *data, size_t dataLength, size_t bufferLength);
void SubsumeBuffer(Binary &binary);
void ClearBuffer();
unsigned char *Buffer() const;
size_t BufferLength() const;
size_t BufferSize() const;
private:
unsigned char *_buffer;
size_t _bufferLength;
size_t _bufferSize;
};
bool operator==(const Binary &left, const Binary &right);
}