Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions

bdlmt::Signaler_SlotNode< t_PROT > Class Template Reference

#include <bdlmt_signaler.h>

Inheritance diagram for bdlmt::Signaler_SlotNode< t_PROT >:
bdlmt::Signaler_SlotNode_Base

List of all members.

Public Types

typedef bsl::pair< int, unsigned > SlotMapKey

Public Member Functions

template<class t_FUNC >
 Signaler_SlotNode (const bsl::weak_ptr< SignalerNode > &signalerNodePtr, BSLS_COMPILERFEATURES_FORWARD_REF(t_FUNC) slot, SlotMapKey slotMapKey, bslma::Allocator *allocator)
void disconnect () BSLS_KEYWORD_NOEXCEPT BSLS_KEYWORD_OVERRIDE
void disconnectAndWait () BSLS_KEYWORD_NOEXCEPT BSLS_KEYWORD_OVERRIDE
void notifyDisconnected () BSLS_KEYWORD_NOEXCEPT
void invoke (typename ArgumentType::ForwardingType1 arg1, typename ArgumentType::ForwardingType2 arg2, typename ArgumentType::ForwardingType3 arg3, typename ArgumentType::ForwardingType4 arg4, typename ArgumentType::ForwardingType5 arg5, typename ArgumentType::ForwardingType6 arg6, typename ArgumentType::ForwardingType7 arg7, typename ArgumentType::ForwardingType8 arg8, typename ArgumentType::ForwardingType9 arg9) const
bool isConnected () const BSLS_KEYWORD_OVERRIDE

Detailed Description

template<class t_PROT>
class bdlmt::Signaler_SlotNode< t_PROT >

Dynamically-allocated container for one slot, containing a function object that can be called by a signaler. Owned by a shared pointer in a skip list container in the Signaler_Node. Also referred to by weak pointers from SignalerConnection objects.

See Component bdlmt_signaler


Member Typedef Documentation

template<class t_PROT >
typedef bsl::pair<int, unsigned> bdlmt::Signaler_SlotNode< t_PROT >::SlotMapKey

Constructor & Destructor Documentation

template<class t_PROT >
template<class t_FUNC >
bdlmt::Signaler_SlotNode< t_PROT >::Signaler_SlotNode ( const bsl::weak_ptr< SignalerNode > &  signalerNodePtr,
BSLS_COMPILERFEATURES_FORWARD_REF(t_FUNC)  slot,
SlotMapKey  slotMapKey,
bslma::Allocator allocator 
)

Create a Signaler_SlotNode object associated with signaler node at the specified signalerNodePtr using the specified slotMapKey and with the specified slot callable object. Specify an allocator used to supply memory.


Member Function Documentation

template<class t_PROT >
void bdlmt::Signaler_SlotNode< t_PROT >::disconnect (  )  [virtual]

Disconnect this slot and return without waiting. If the slot was already disconnected, this function has no effect. Throws nothing. Note that it is guaranteed that this slot will not be called by a signal on the same signaler that begins after this function completes.

Implements bdlmt::Signaler_SlotNode_Base.

template<class t_PROT >
void bdlmt::Signaler_SlotNode< t_PROT >::disconnectAndWait (  )  [virtual]

Disconnect this slot and block the calling thread pending the completion of signals being emitted on the signaler by any other threads. If the slot was already disconnected, this function has no effect on the slot. Throws nothing. The behavior is undefined if this function is called from a slot on the same signaler. Note that it is guaranteed that this slot will not be called by a signal on the same signaler that begins after this function completes, whether wait is true or not.

Implements bdlmt::Signaler_SlotNode_Base.

template<class t_PROT >
void bdlmt::Signaler_SlotNode< t_PROT >::notifyDisconnected (  ) 

Notify this slot that is was disconnected from its associated signaler. Throws nothing. After this function completes, isConnected() returns false.

template<class t_PROT >
void bdlmt::Signaler_SlotNode< t_PROT >::invoke ( typename ArgumentType::ForwardingType1  arg1,
typename ArgumentType::ForwardingType2  arg2,
typename ArgumentType::ForwardingType3  arg3,
typename ArgumentType::ForwardingType4  arg4,
typename ArgumentType::ForwardingType5  arg5,
typename ArgumentType::ForwardingType6  arg6,
typename ArgumentType::ForwardingType7  arg7,
typename ArgumentType::ForwardingType8  arg8,
typename ArgumentType::ForwardingType9  arg9 
) const

Invoke the stored callback c, as if by c(args...), where args... are the specified arguments arg1, arg2, arg3, etc., except that the actual number of arguments passed to c is equal to the number of arguments for t_PROT. If this slot is disconnected, this function has no effect.

template<class t_PROT >
bool bdlmt::Signaler_SlotNode< t_PROT >::isConnected (  )  const [virtual]

Return true if this slot is connected to its associated signaler, and false otherwise.

Implements bdlmt::Signaler_SlotNode_Base.


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