Public Types | |
typedef unsigned long | BufferCount |
Public Member Functions | |
CBufferHandleAllocator (BufferCount maxFreeBuffers, JetByteTools::IO::IAllocateBuffers &bufferAllocator, bool log=true) | |
CBufferHandleAllocator (const CBufferHandleAllocator &rhs) | |
~CBufferHandleAllocator () override | |
CBufferHandleAllocator & | operator= (const CBufferHandleAllocator &rhs) |
BufferCount | EnlargePool (BufferCount buffersToAdd) |
Add buffersToAdd buffer handles to the pool. | |
CBufferHandle * | AllocateHandle () override |
Allocate a CBufferHandle, remember to call Release() on it when you're done with it. | |
IBuffer::BufferSize | GetBufferSize () const override |
CSmartBuffer | Allocate () override |
Allocate an instance of IBuffer, remember to call Release() on it when you're done with it. | |
CSmartBuffer | Allocate (const IBuffer &buffer) override |
Allocate a CBufferHandle and attach the supplied IBuffer to it, return the CBufferHandle's IBuffer interface, remember to call Release() on it when you're done with it. | |
CSmartBuffer | AllocateCustomSizedBuffer (IBuffer::BufferSize bufferSize) override |
bool | Flush () override |
Flushes the allocator. Use with care as this forces active buffer handles to be released and destroyed! Generally only called as part of process cleanup and even then only to aid in buffer leak tracking. |
typedef unsigned long BufferCount [inherited] |
CBufferHandleAllocator | ( | BufferCount | maxFreeBuffers, | |
JetByteTools::IO::IAllocateBuffers & | bufferAllocator, | |||
bool | log = true | |||
) |
CBufferHandleAllocator | ( | const CBufferHandleAllocator & | rhs | ) |
~CBufferHandleAllocator | ( | ) | [override] |
Reimplemented from CBufferHandleAllocator.
CBufferHandleAllocator& operator= | ( | const CBufferHandleAllocator & | rhs | ) |
CBufferHandleAllocator::BufferCount EnlargePool | ( | BufferCount | buffersToAdd | ) | [inherited] |
Add buffersToAdd buffer handles to the pool.
CBufferHandle * AllocateHandle | ( | ) | [override, virtual, inherited] |
Allocate a CBufferHandle, remember to call Release() on it when you're done with it.
Implements IAllocateBufferHandles.
IBuffer::BufferSize GetBufferSize | ( | ) | const [override, virtual, inherited] |
Implements IManageBufferLifeCycle.
CSmartBuffer Allocate | ( | ) | [override, virtual, inherited] |
Allocate an instance of IBuffer, remember to call Release() on it when you're done with it.
Implements IManageBufferLifeCycle.
CSmartBuffer Allocate | ( | const IBuffer & | buffer | ) | [override, virtual, inherited] |
Allocate a CBufferHandle and attach the supplied IBuffer to it, return the CBufferHandle's IBuffer interface, remember to call Release() on it when you're done with it.
Implements IAllocateBufferHandles.
CSmartBuffer AllocateCustomSizedBuffer | ( | IBuffer::BufferSize | bufferSize | ) | [override, virtual, inherited] |
Implements IManageBufferLifeCycle.
bool Flush | ( | ) | [override, virtual, inherited] |
Flushes the allocator. Use with care as this forces active buffer handles to be released and destroyed! Generally only called as part of process cleanup and even then only to aid in buffer leak tracking.
Implements IAllocateBufferHandles.