8#ifndef INCLUDED_BSLMT_ENTRYPOINTFUNCTORADAPTER
9#define INCLUDED_BSLMT_ENTRYPOINTFUNCTORADAPTER
193#include <bslscm_version.h>
206#include <bsl_string.h>
220template <
class THREAD_POLICY>
261template <
typename TYPE>
290 static void invokerFunction(
void *adapter);
314 template<
typename TYPE>
317 const TYPE& invokable,
333 InvokerFunction function)
334: d_function(function)
350template <
typename TYPE>
361 if (
false == adapter->d_threadName.
empty()) {
363 adapter->d_threadName);
366 adapter->functor()();
370template <
typename TYPE>
372EntryPointFunctorAdapter<TYPE>::EntryPointFunctorAdapter(
376: EntryPointFunctorAdapter_Base(&invokerFunction)
377, d_functor(functor, allocator)
378, d_threadName(threadName, allocator)
382template <
typename TYPE>
384TYPE& EntryPointFunctorAdapter<TYPE>::functor()
386 return d_functor.object();
393template <
typename TYPE>
397 const TYPE& invokable,
Definition bslstl_string.h:1281
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Return the allocator used by this string to supply memory.
Definition bslstl_string.h:6723
bool empty() const BSLS_KEYWORD_NOEXCEPT
Return true if this string has length 0, and false otherwise.
Definition bslstl_string.h:6631
Definition bslalg_constructorproxy.h:368
Definition bslma_allocator.h:457
Definition bslma_managedptr.h:1182
Definition bslma_rawdeleterguard.h:217
Definition bslmt_entrypointfunctoradapter.h:230
InvokerFunction function() const
Return the function supplied at construction.
Definition bslmt_entrypointfunctoradapter.h:340
EntryPointFunctorAdapter_Base(InvokerFunction function)
Create a new object holding the specified function.
Definition bslmt_entrypointfunctoradapter.h:332
void(* InvokerFunction)(void *)
Definition bslmt_entrypointfunctoradapter.h:239
Definition bslmt_entrypointfunctoradapter.h:262
~EntryPointFunctorAdapter()=default
Definition bslstl_stringref.h:372
void * bslmt_EntryPointFunctorAdapter_invoker(void *argument)
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bslmt_barrier.h:344
static Allocator * allocator(Allocator *basicAllocator=0)
Definition bslma_default.h:897
Definition bslmt_entrypointfunctoradapter.h:305
static void allocateAdapter(bslma::ManagedPtr< EntryPointFunctorAdapter< TYPE > > *adapter, const TYPE &invokable, const bslstl::StringRef &threadName, bslma::Allocator *basicAllocator=0)
Definition bslmt_entrypointfunctoradapter.h:395
Definition bslmt_entrypointfunctoradapter.h:221