BDE 4.14.0 Production release
|
#include <bdlbb_simpleblobbufferfactory.h>
Public Member Functions | |
BSLMF_NESTED_TRAIT_DECLARATION (SimpleBlobBufferFactory, bslmf::IsBitwiseMoveable) | |
BSLMF_NESTED_TRAIT_DECLARATION (SimpleBlobBufferFactory, bslma::UsesBslmaAllocator) | |
SimpleBlobBufferFactory (int bufferSize, bslma::Allocator *basicAllocator=0) | |
~SimpleBlobBufferFactory () BSLS_KEYWORD_OVERRIDE | |
Destroy this SimpleBlobBufferFactory object. | |
void | allocate (bdlbb::BlobBuffer *buffer) BSLS_KEYWORD_OVERRIDE |
void | setBufferSize (int bufferSize) |
int | bufferSize () const |
Public Member Functions inherited from bdlbb::BlobBufferFactory | |
virtual | ~BlobBufferFactory () |
Destroy this blob buffer factory. | |
This class
declares an implementation of BlobBufferFactory
where each segment loaded to a BlobBuffer
is created with a separate calls to the allocator specified at construction, or the default allocator is no allocator was specified.
|
explicit |
Create a SimpleBlobBufferFactory
object that will create blob buffers of specified length bufferSize
. Optionally specify a basicAllocator
used to supply memory. If basicAllocator
is 0, the currently installed default allocator is used.
bdlbb::SimpleBlobBufferFactory::~SimpleBlobBufferFactory | ( | ) |
|
virtual |
Allocate a blob buffer from this blob buffer factory, and load it into the specified buffer
.
Implements bdlbb::BlobBufferFactory.
bdlbb::SimpleBlobBufferFactory::BSLMF_NESTED_TRAIT_DECLARATION | ( | SimpleBlobBufferFactory | , |
bslma::UsesBslmaAllocator | |||
) |
bdlbb::SimpleBlobBufferFactory::BSLMF_NESTED_TRAIT_DECLARATION | ( | SimpleBlobBufferFactory | , |
bslmf::IsBitwiseMoveable | |||
) |
int bdlbb::SimpleBlobBufferFactory::bufferSize | ( | ) | const |
Return the current size with which this factory will allocate buffers.
void bdlbb::SimpleBlobBufferFactory::setBufferSize | ( | int | bufferSize | ) |
Set the buffer size for future buffers created by this factory to the specified bufferSize
.