BDE 4.14.0 Production release
|
#include <bdlmt_signaler.h>
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) | |
~Signaler_SlotNode ()=default | |
Destroy this object. | |
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 |
Additional Inherited Members | |
Protected Member Functions inherited from bdlmt::Signaler_SlotNode_Base | |
virtual | ~Signaler_SlotNode_Base () |
Virtual d'tor. | |
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 bdlmt_signaler
typedef bsl::pair<int, unsigned> bdlmt::Signaler_SlotNode< t_PROT >::SlotMapKey |
Defines a "key" used to index slots in an associative collection. The first element of the pair is the slot call group; the second is the slot ID.
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.
|
default |
|
inlinevirtual |
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.
|
inlinevirtual |
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.
|
inline |
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.
|
inlinevirtual |
Return true
if this slot is connected to its associated signaler, and false
otherwise.
Implements bdlmt::Signaler_SlotNode_Base.
|
inline |
Notify this slot that is was disconnected from its associated signaler. Throws nothing. After this function completes, isConnected()
returns false
.