BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE > Class Template Reference

#include <bslstl_stoptoken.h>

Inheritance diagram for bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >:
bslstl::StopCallback_Node< t_CALLBACK >

Public Types

typedef bsl::conditional< BloombergLP::bslma::UsesBslmaAllocator< t_CALLBACK >::value, bsl::allocator< char >, StopCallback_NoAlloc >::type allocator_type
 

Public Member Functions

template<class t_ARG >
 StopCallback_CallbackStorage (const allocator_type &allocator, BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG) arg)
 
template<class t_ARG >
 StopCallback_CallbackStorage (const allocator_type &allocator, t_ARG &arg)
 
 ~StopCallback_CallbackStorage ()
 Destroy this object.
 
t_CALLBACK & callback ()
 Return a reference to the stored callback.
 
const t_CALLBACK & callback () const
 Return a const reference to the stored callback.
 

Detailed Description

template<class t_CALLBACK, bool t_IS_REFERENCE = bsl::is_reference<t_CALLBACK>::value>
class bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >

The primary class template stores an object of non-reference type given by the template parameter t_CALLBACK. (That is, the primary template provides the implementation only when t_IS_REFERENCE is false.)

See bslstl_stoptoken

Member Typedef Documentation

◆ allocator_type

template<class t_CALLBACK , bool t_IS_REFERENCE = bsl::is_reference<t_CALLBACK>::value>
typedef bsl::conditional<BloombergLP::bslma::UsesBslmaAllocator<t_CALLBACK>::value,bsl::allocator<char>,StopCallback_NoAlloc>::type bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >::allocator_type

Constructor & Destructor Documentation

◆ StopCallback_CallbackStorage() [1/2]

template<class t_CALLBACK , bool t_IS_REFERENCE>
template<class t_ARG >
bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >::StopCallback_CallbackStorage ( const allocator_type allocator,
BSLS_COMPILERFEATURES_FORWARD_REF(t_ARG)  arg 
)

Initialize the stored callback by forwarding the specified arg to the constructor of t_CALLBACK; the specified allocator is used to supply memory if t_CALLBACK is allocator-aware (and ignored otherwise).

◆ StopCallback_CallbackStorage() [2/2]

template<class t_CALLBACK , bool t_IS_REFERENCE>
template<class t_ARG >
bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >::StopCallback_CallbackStorage ( const allocator_type allocator,
t_ARG &  arg 
)

◆ ~StopCallback_CallbackStorage()

template<class t_CALLBACK , bool t_IS_REFERENCE>
bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >::~StopCallback_CallbackStorage ( )

Member Function Documentation

◆ callback() [1/2]

template<class t_CALLBACK , bool t_IS_REFERENCE>
t_CALLBACK & bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >::callback ( )

◆ callback() [2/2]

template<class t_CALLBACK , bool t_IS_REFERENCE>
const t_CALLBACK & bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >::callback ( ) const

The documentation for this class was generated from the following file: