Provide a protocol for a thread‐safe object creator and deleter.

Synopsis

Declared in <bdlma_factory.h>

template<class TYPE>
class Factory
    : public Deleter<TYPE>

Description

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.

Base Classes

Name

Description

Deleter<TYPE>

Provide a protocol (or pure interface) for a thread‐safe object deleter.

Member Functions

Name

Description

~Factory [destructor] [virtual]

Destroy this object factory.

createObject [virtual]

Create a default‐constructed instance of TYPE.

deleteObject [virtual]

Destroy the specified instance and release its memory.

Derived Classes

Name

Description

ObjectPool

Thread‐safe pool of reusable objects that implements bdlma::Factory.

Created with MrDocs