CBufferAllocator Class Reference

Inheritance diagram for CBufferAllocator:

Inheritance graph
[legend]
Collaboration diagram for CBufferAllocator:

Collaboration graph
[legend]

List of all members.

Public Types

typedef unsigned short BufferCount
typedef
IBuffer::BufferSize 
BufferSize

Public Member Functions

 CBufferAllocator (const BufferSize bufferSize, const BufferCount maxFreeBuffers, const bool log=true)
 ~CBufferAllocator ()
BufferCount EnlargePool (const BufferCount buffersToAdd)
 Add buffersToAdd buffers to the pool.
virtual
JetByteTools::Win32::IIndexedOpaqueUserData::UserDataIndex 
RequestUserDataSlot (const JetByteTools::Win32::_tstring &name)
 Request a named user data slot and get an index to use in calls to methods on IIndexedOpaqueUserData.
virtual
JetByteTools::Win32::IIndexedOpaqueUserData::UserDataIndex 
LockUserDataSlots ()
 Prevent more user data slots from being allocated. Returns the number of user data slots that have been allocated.
virtual IBuffer * Allocate ()
 Allocate an instance of IBuffer, remember to call Release() on it when you're done with it.
virtual BufferSize GetBufferSize () const
 Returns the size of the buffers that are allocated by this allocator.
virtual void Flush ()
 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.


Member Typedef Documentation

typedef unsigned short BufferCount [inherited]

typedef IBuffer::BufferSize BufferSize [inherited]


Constructor & Destructor Documentation

CBufferAllocator ( const BufferSize  bufferSize,
const BufferCount  maxFreeBuffers,
const bool  log = true 
)

~CBufferAllocator (  ) 

Reimplemented from CBufferAllocator.


Member Function Documentation

CBufferAllocator::BufferCount EnlargePool ( const BufferCount  buffersToAdd  )  [inherited]

Add buffersToAdd buffers to the pool.

virtual JetByteTools::Win32::IIndexedOpaqueUserData::UserDataIndex RequestUserDataSlot ( const JetByteTools::Win32::_tstring name  )  [virtual, inherited]

Request a named user data slot and get an index to use in calls to methods on IIndexedOpaqueUserData.

Implements IProvideUserData.

UserDataIndex LockUserDataSlots (  )  [virtual, inherited]

Prevent more user data slots from being allocated. Returns the number of user data slots that have been allocated.

Implements IProvideUserData.

IBuffer * Allocate (  )  [virtual, inherited]

Allocate an instance of IBuffer, remember to call Release() on it when you're done with it.

Implements IAllocateBuffers.

IAllocateBuffers::BufferSize GetBufferSize (  )  const [virtual, inherited]

Returns the size of the buffers that are allocated by this allocator.

Implements IAllocateBuffers.

void Flush (  )  [virtual, inherited]

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.


Generated on Thu Mar 26 16:38:29 2009 for JetByte Socket Tools - v6.0 by  doxygen 1.5.3