BDE 4.14.0 Production release
|
#include <bdlma_factory.h>
Public Member Functions | |
virtual | ~Factory () |
Destroy this object factory. | |
virtual TYPE * | createObject ()=0 |
virtual void | deleteObject (TYPE *instance)=0 |
Public Member Functions inherited from bdlma::Deleter< TYPE > | |
virtual | ~Deleter () |
Destroy this object deleter. | |
This class
provides a protocol (or pure interface) for a thread-safe object creator and deleter. It extends the Deleter
protocol with the addition of a createObject
method.
See bdlma_factory
|
virtual |
|
pure virtual |
Create an instance of the specified TYPE
using default arguments. Return the address of the newly-created object on success, and 0 otherwise. The instance must be destroyed using the deleteObject
method of this object factory.
Implemented in bdlcc::ObjectPool< TYPE, CREATOR, RESETTER >, bdlcc::ObjectPool< bdlmt::MultiQueueThreadPool_Queue, bsl::function, bdlcc::ObjectPoolFunctors::Reset< bdlmt::MultiQueueThreadPool_Queue > >, and bdlcc::ObjectPool< RepType, ObjectPoolFunctors::DefaultCreator, ObjectPoolFunctors::Reset< RepType > >.
|
pure virtual |
Destroy the specified instance
based on its static type and return its memory footprint to the appropriate memory manager. The behavior is undefined unless instance
was obtained from a call to createObject
on this object factory and has not yet been deleted.
Implements bdlma::Deleter< TYPE >.
Implemented in bdlcc::ObjectPool< bdlmt::MultiQueueThreadPool_Queue, bsl::function, bdlcc::ObjectPoolFunctors::Reset< bdlmt::MultiQueueThreadPool_Queue > >, bdlcc::ObjectPool< RepType, ObjectPoolFunctors::DefaultCreator, ObjectPoolFunctors::Reset< RepType > >, and bdlcc::ObjectPool< TYPE, CREATOR, RESETTER >.