BloombergLP::bslmt::EntryPointFunctorAdapterUtil::allocateAdapter

Allocate an adapter for invokable and load it into adapter.

Synopsis

Declared in <bslmt_entrypointfunctoradapter.h>

template<typename TYPE>
static
void
allocateAdapter(
    bslma::ManagedPtr<EntryPointFunctorAdapter<TYPE>>* adapter,
    TYPE const& invokable,
    bslstl::StringRef const& threadName,
    bslma::Allocator* basicAllocator = 0);

Description

Allocate a new EntryPointFunctorAdapter holding copies of the specified invokable object and threadName, and load the result into the specified adapter. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

Parameters

NameDescription
adaptermanaged pointer to receive the allocated adapter
invokablefunctor copied into the allocated adapter
threadNamethread name stored with the allocated adapter
basicAllocatorallocator used to supply memory