extend memory bin to get access of part of data, for example copy the last half of it

This commit is contained in:
Dario 2020-08-28 12:36:02 +02:00 committed by Ulf Gebhardt
parent 5575208cac
commit d285287be5
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -18,6 +18,7 @@
#include <list>
#include <stack>
#include <assert.h>
#define MEMORY_MANAGER_PAGE_SIZE 10
@ -41,6 +42,8 @@ public:
inline unsigned char* data() { return mData; }
inline const unsigned char* data() const { return mData; }
inline unsigned char* data(size_t startIndex) { assert(startIndex < mSize); return &mData[startIndex]; }
inline const unsigned char* data(size_t startIndex) const { assert(startIndex < mSize); return &mData[startIndex]; }
std::string convertToHex();
//! \return 0 if ok
//! -1 if bin is to small