Important update:

- EventBufferCore: (new)
  - Defines Events and related functions
  - Defines Event Buffer
- ItemBuffer:
  - Specify "Keep" parameter for Delete, to override CopyEntries
This commit is contained in:
Charl Wentzel
2017-08-21 20:51:10 +02:00
parent 2830b8dd6d
commit 5f5e89e7cd
6 changed files with 502 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
* BufferCore.h
* ItemBufferCore.h
*
* Created on: 22 July 2017
* Author: wentzelc
@@ -149,7 +149,7 @@ void * CItemBuffer::Peek( int * Size )
}
//---------------------------------------------------------------------------
bool CItemBuffer::Delete()
bool CItemBuffer::Delete( bool Keep )
{
TBufferItem * BufferItem;
@@ -166,7 +166,7 @@ bool CItemBuffer::Delete()
LastItem = &FirstItem;
// Destroy entry and holder
if (CopyEntries)
if (CopyEntries && !Keep)
DestroyEntry( &(BufferItem->Entry) );
free( BufferItem );