Public Types | |
typedef IBuffer::BufferSize | BufferSize |
Public Member Functions | |
CBufferBasedBufferAllocator (IBuffer &buffer) | |
CBufferBasedBufferAllocator (const CBufferBasedBufferAllocator &rhs) | |
CBufferBasedBufferAllocator & | operator= (const CBufferBasedBufferAllocator &rhs) |
CSmartBuffer | Allocate () override |
Allocate an instance of IBuffer, remember to call Release() on it when you're done with it. | |
CSmartBuffer | AllocateCustomSizedBuffer (const BufferSize bufferSize) override |
void | AllocateBuffers (size_t numBuffers, CBufferChain &chain) override |
void | AllocateBuffersForBytes (const size_t numBytes, CBufferChain &chain) override |
BufferSize | GetBufferSize () const override |
Returns the size of the buffers that are allocated by this allocator. | |
bool | Flush () override |
Flushes the allocator. Use with care as this forces active buffers to be released and destroyed! Generally only called as part of process cleanup and even then only to aid in buffer leak tracking. | |
CSmartBuffer | AllocateCustomSizedBuffer (BufferSize bufferSize) override=0 |
Creates a buffer that is a specific size rather than the size that the allocator usually creates. These buffers are currently NOT pooled and are deleted when the last reference is released. | |
Static Public Attributes | |
static const JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex | DefaultBufferChainIndex = 0 |
static const JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex | NumberOfDefaultUserDataSlots = 1 |
Static Protected Member Functions | |
static void | AllocateDefaultUserDataIndices (JetByteTools::Core::IProvideUserData &dataProvider) |
typedef IBuffer::BufferSize BufferSize [inherited] |
CBufferBasedBufferAllocator | ( | IBuffer & | buffer | ) | [inline, explicit] |
CBufferBasedBufferAllocator | ( | const CBufferBasedBufferAllocator & | rhs | ) |
CBufferBasedBufferAllocator& operator= | ( | const CBufferBasedBufferAllocator & | rhs | ) |
CSmartBuffer Allocate | ( | ) | [inline, override, virtual] |
Allocate an instance of IBuffer, remember to call Release() on it when you're done with it.
Implements IAllocateBuffers.
CSmartBuffer AllocateCustomSizedBuffer | ( | const BufferSize | bufferSize | ) | [inline, override] |
void AllocateBuffers | ( | size_t | numBuffers, | |
CBufferChain & | chain | |||
) | [inline, override, virtual] |
Implements IAllocateBuffers.
void AllocateBuffersForBytes | ( | const size_t | numBytes, | |
CBufferChain & | chain | |||
) | [inline, override, virtual] |
Implements IAllocateBuffers.
BufferSize GetBufferSize | ( | ) | const [inline, override, virtual] |
bool Flush | ( | ) | [inline, override, virtual] |
Flushes the allocator. Use with care as this forces active buffers to be released and destroyed! Generally only called as part of process cleanup and even then only to aid in buffer leak tracking.
Implements IAllocateBuffers.
CSmartBuffer AllocateCustomSizedBuffer | ( | BufferSize | bufferSize | ) | [override, pure virtual, inherited] |
Creates a buffer that is a specific size rather than the size that the allocator usually creates. These buffers are currently NOT pooled and are deleted when the last reference is released.
Implements IAllocateBuffer.
static void AllocateDefaultUserDataIndices | ( | JetByteTools::Core::IProvideUserData & | dataProvider | ) | [static, protected, inherited] |
const JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex DefaultBufferChainIndex = 0 [static, inherited] |
const JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex NumberOfDefaultUserDataSlots = 1 [static, inherited] |