BDE 4.14.0 Production release
|
#include <bslstl_stoptoken.h>
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. | |
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
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 |
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).
bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >::StopCallback_CallbackStorage | ( | const allocator_type & | allocator, |
t_ARG & | arg | ||
) |
bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >::~StopCallback_CallbackStorage | ( | ) |
t_CALLBACK & bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >::callback | ( | ) |
const t_CALLBACK & bslstl::StopCallback_CallbackStorage< t_CALLBACK, t_IS_REFERENCE >::callback | ( | ) | const |