Public Types | |
typedef IBuffer::BufferSize | BufferSize |
Public Member Functions | |
CSmartBuffer | Allocate () override=0 |
Allocate an instance of IBuffer, remember to call Release() on it when you're done with it. | |
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. | |
virtual void | AllocateBuffers (size_t numBuffers, CBufferChain &buffers)=0 |
virtual void | AllocateBuffersForBytes (size_t numBytes, CBufferChain &buffers)=0 |
virtual BufferSize | GetBufferSize () const =0 |
Returns the size of the buffers that are allocated by this allocator. | |
virtual bool | Flush ()=0 |
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. | |
virtual IIndexedOpaqueUserData::UserDataIndex | RequestUserDataSlot (const _tstring &name)=0 |
Request a named user data slot and get an index to use in calls to methods on IIndexedOpaqueUserData. | |
virtual IIndexedOpaqueUserData::UserDataIndex | LockUserDataSlots ()=0 |
Prevent more user data slots from being allocated. Returns the number of user data slots that have been allocated. | |
Static Public Attributes | |
static const JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex | DefaultBufferChainIndex = 0 |
static const JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex | NumberOfDefaultUserDataSlots = 1 |
Protected Member Functions | |
~IAllocateBuffers () override | |
We never delete instances of this interface; you must manage the lifetime of the class that implements it. | |
Static Protected Member Functions | |
static void | AllocateDefaultUserDataIndices (JetByteTools::Core::IProvideUserData &dataProvider) |
typedef IBuffer::BufferSize BufferSize |
~IAllocateBuffers | ( | ) | [override, protected] |
We never delete instances of this interface; you must manage the lifetime of the class that implements it.
CSmartBuffer Allocate | ( | ) | [override, pure virtual] |
Allocate an instance of IBuffer, remember to call Release() on it when you're done with it.
Implements IAllocateBuffer.
Implemented in CBufferAllocator, and CBufferBasedBufferAllocator.
CSmartBuffer AllocateCustomSizedBuffer | ( | BufferSize | bufferSize | ) | [override, pure virtual] |
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.
virtual void AllocateBuffers | ( | size_t | numBuffers, | |
CBufferChain & | buffers | |||
) | [pure virtual] |
Implemented in CBufferAllocator, and CBufferBasedBufferAllocator.
virtual void AllocateBuffersForBytes | ( | size_t | numBytes, | |
CBufferChain & | buffers | |||
) | [pure virtual] |
Implemented in CBufferAllocator, and CBufferBasedBufferAllocator.
virtual BufferSize GetBufferSize | ( | ) | const [pure virtual] |
Returns the size of the buffers that are allocated by this allocator.
Implemented in CBufferAllocator, and CBufferBasedBufferAllocator.
virtual bool Flush | ( | ) | [pure 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.
Implemented in CBufferAllocator, and CBufferBasedBufferAllocator.
static void AllocateDefaultUserDataIndices | ( | JetByteTools::Core::IProvideUserData & | dataProvider | ) | [static, protected] |
virtual IIndexedOpaqueUserData::UserDataIndex RequestUserDataSlot | ( | const _tstring & | name | ) | [pure virtual, inherited] |
Request a named user data slot and get an index to use in calls to methods on IIndexedOpaqueUserData.
Implemented in CBufferAllocator, TDatagramFilteringHelper, CFilteringStreamSocketConnectionManagerBase, TDatagramFilteringHelper< JetByteTools::Socket::IDatagramSocketConnectionManagerCallback, JetByteTools::Socket::IDatagramSocketConnectionManagerIO, JetByteTools::Socket::IDatagramSocketEx >, TSocketAllocator< JetByteTools::Socket::IAllocateDatagramSockets >, TSocketAllocator< JetByteTools::Socket::IAllocateStreamSockets >, TSocketAllocator< JetByteTools::Socket::IAllocateSequencedStreamSockets >, and TSocketAllocator< JetByteTools::Socket::IAllocateDatagramServerSockets >.
virtual IIndexedOpaqueUserData::UserDataIndex LockUserDataSlots | ( | ) | [pure virtual, inherited] |
Prevent more user data slots from being allocated. Returns the number of user data slots that have been allocated.
Implemented in CBufferAllocator, TDatagramFilteringHelper, CFilteringStreamSocketConnectionManagerBase, TDatagramFilteringHelper< JetByteTools::Socket::IDatagramSocketConnectionManagerCallback, JetByteTools::Socket::IDatagramSocketConnectionManagerIO, JetByteTools::Socket::IDatagramSocketEx >, TSocketAllocator< JetByteTools::Socket::IAllocateDatagramSockets >, TSocketAllocator< JetByteTools::Socket::IAllocateStreamSockets >, TSocketAllocator< JetByteTools::Socket::IAllocateSequencedStreamSockets >, and TSocketAllocator< JetByteTools::Socket::IAllocateDatagramServerSockets >.
const JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex DefaultBufferChainIndex = 0 [static] |
const JetByteTools::Core::IIndexedOpaqueUserData::UserDataIndex NumberOfDefaultUserDataSlots = 1 [static] |