|
BDE 4.39.x Production Release
|
#include <bdlmt_signaler.h>
Provides the implementation of a signaler. This object has a 1-1 relationship with the Signaler, which has a shared pointer to it. This allows other objects to refer to it via shared and weak pointers. This allows SignalerConnection objects to outlive the Signaler - Signaler_Node pair, since they can test or lock weak pointers to see if the Signaler_Node still exists when they are trying to disconnect themselves.
Additional Inherited Members | |
Protected Member Functions inherited from bsl::enable_shared_from_this< Signaler_Node< t_PROT > > | |
| enable_shared_from_this () BSLS_KEYWORD_NOEXCEPT | |
| enable_shared_from_this (const enable_shared_from_this &unused) BSLS_KEYWORD_NOEXCEPT | |
| ~enable_shared_from_this () | |
| enable_shared_from_this & | operator= (const enable_shared_from_this &rhs) BSLS_KEYWORD_NOEXCEPT |
|
explicit |
Create a Signaler_Node object having no connected slots. Specify an allocator used to supply memory.
| SignalerConnection bdlmt::Signaler_Node< t_PROT >::connect | ( | BSLS_COMPILERFEATURES_FORWARD_REF(t_FUNC) | slot, |
| int | group | ||
| ) |
Implements Signaler::connect. Connect the specified slot, a callable object which must meet the Slot Object Requirements described in the component documentation, to this signaler. Specify a group used to order slots upon invocation. Return an instance of SignalerConnection representing the created connection. This function meets the strong exception guarantee.
t_FUNC may have a return type other than void, but in that case, when the slot is called, the return value will be discarded. | void bdlmt::Signaler_Node< t_PROT >::disconnectAllSlots | ( | ) |
Implements Signaler::disconnectAllSlots(). Disconnect all slots, if any, connected to this signaler. Any signals emitted on the corresponding signaler that happen after this call to disconnect completes will not call any slots that were connected prior to this call. Throws nothing.
| void bdlmt::Signaler_Node< t_PROT >::disconnectAllSlotsAndWait | ( | ) |
Implements Signaler::disconnectAllSlotsAndWait. Disconnect all slots, if any, connected to this signaler. Any signals emitted on the corresponding signaler that happens after this call to disconnect completes will not call any slots that were connected prior to this call. This function blocks the calling thread pending completion of all ongoing signals being emitted on the signaler. Throws nothing.
| void bdlmt::Signaler_Node< t_PROT >::disconnectGroup | ( | int | group | ) |
Implements Signaler::disconnectGroup(). Disconnect all slots, if any, connected to this signaler in the specified group. Any signal emitted on the corresponding signaler that happens after this call to disconnect completes will not call any slots in group that were connected prior to this call. Throws nothing.
group is connected to this signaler during a call to this function, it is unspecified whether that slot will be disconnected. | void bdlmt::Signaler_Node< t_PROT >::disconnectGroupAndWait | ( | int | group | ) |
Implements Signaler::disconnectGroupAndWait(). Disconnect all slots, if any, connected to this signaler in the specified group. Any signal emitted on the corresponding signaler that happens after this call to disconnect completes will not call any slots in group that were connected prior to this call. This function blocks the calling thread pending completion of ongoing signals being emitted on the signaler. Throws nothing.
group is connected to this signaler during a call to this function, it is unspecified whether that slot will be disconnected.
|
inline |
Called by Signaler_Invocables call operators, passing the specified arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 and arg9 on to the slots.
| void bdlmt::Signaler_Node< t_PROT >::notifyDisconnected | ( | SlotMapKey | slotMapKey | ) |
Notify this signaler that a slot with the specified slotMapKey was disconnected. Throws nothing.
|
inline |
Implements Signaler::slotCount(). Return the number of slots connected to this signaler.
slotCount() is approximate.
|
inline |
Block until all signals currently being emitted on the signaler have completed.