libktorrent  2.2.0
Public Types | Public Member Functions | List of all members
bt::BufferPool Class Reference

#include <bufferpool.h>

Public Types

typedef QSharedPointer< BufferPoolPtr
 

Public Member Functions

void clear ()
 
Buffer::Ptr get (bt::Uint32 min_size)
 
void release (Buffer::Data data, bt::Uint32 size)
 
void setWeakPointer (QWeakPointer< BufferPool > wp)
 

Detailed Description

Keeps track of a pool of buffers.

Definition at line 89 of file bufferpool.h.

Member Function Documentation

◆ clear()

void bt::BufferPool::clear ( )

Clear the pool.

◆ get()

Buffer::Ptr bt::BufferPool::get ( bt::Uint32  min_size)

Get a buffer for a given size. The buffer returned might be bigger then the requested size.

Parameters
min_sizeThe minimum size it should be
Returns
A new Buffer

◆ release()

void bt::BufferPool::release ( Buffer::Data  data,
bt::Uint32  size 
)

Release a buffer, puts it into the free list.

Parameters
dataThe Buffer::Data
sizeThe size of the data object

◆ setWeakPointer()

void bt::BufferPool::setWeakPointer ( QWeakPointer< BufferPool wp)
inline

Set the weak pointer to the buffer pool itself.

Parameters
wpThe weak pointer

Definition at line 99 of file bufferpool.h.


The documentation for this class was generated from the following file: