The MemBlock class represents memory blocks (arrays of bytes). It encapsulates a pointer to a C array of "char" and the size of the array in a single object as follows:
class MemBlock
{
public :
int len;
const char *data;
MemBlock() : data(0), len(0) {}
MemBlock(const char *data, int len) : data(data), len(len) {}
char operator[](int i) const { return data[i]; }
};
Method | Inherited | Description |
MemBlock | (Self) | The constructor of the MemBlock class. |
© 2023 Advanced Software Engineering Limited. All rights reserved.