Maj terminée. Pour consulter la release notes associée voici le lien :

Commit 796aa534 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

Add a method to the group of cell class in order to attach to a buffer after...

Add a method to the group of cell class in order to attach to a buffer after the construction and reset
parent 972319a8
......@@ -44,6 +44,30 @@ protected:
bool deleteBuffer;
: allocatedMemoryInByte(0), memoryBuffer(nullptr),
blockHeader(nullptr), blockIndexesTable(nullptr), blockCells(nullptr),
void reset(unsigned char* inBuffer, const size_t inAllocatedMemoryInByte){
for(int idxCellPtr = 0 ; idxCellPtr < blockHeader->blockIndexesTableSize ; ++idxCellPtr){
if(blockIndexesTable[idxCellPtr] != CellIsEmptyFlag){
// Move the pointers to the correct position
allocatedMemoryInByte = (inAllocatedMemoryInByte);
memoryBuffer = (inBuffer);
blockHeader = reinterpret_cast<BlockHeader*>(memoryBuffer);
blockIndexesTable = reinterpret_cast<int*>(memoryBuffer+sizeof(BlockHeader));
blockCells = reinterpret_cast<CellClass*>(memoryBuffer+sizeof(BlockHeader)+(blockHeader->blockIndexesTableSize*sizeof(int)));
deleteBuffer = (false);
* Init from a given buffer
* @param inBuffer
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment