[#BloombergLP-bdlmt-Signaler_Node]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::Signaler&lowbar;Node
:relfileprefix: ../../
:mrdocs:

Provides the implementation of a signaler&period; This object has a 1&hyphen;1 relationship with the `Signaler`, which has a shared pointer to it&period; This allows other objects to refer to it via shared and weak pointers&period; This allows `SignalerConnection` objects to outlive the &grave;Signaler &hyphen; Signaler&lowbar;Node&grave; pair, since they can test or lock weak pointers to see if the `Signaler&lowbar;Node` still exists when they are trying to disconnect themselves&period;

== Synopsis

Declared in `&lt;bdlmt&lowbar;signaler&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;PROT&gt;
class Signaler&lowbar;Node
    : public xref:bsl/enable_shared_from_this.adoc[bsl::enable&lowbar;shared&lowbar;from&lowbar;this&lt;Signaler&lowbar;Node&lt;t&lowbar;PROT&gt;&gt;]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:bsl/enable_shared_from_this.adoc[bsl::enable&lowbar;shared&lowbar;from&lowbar;this&lt;Signaler&lowbar;Node&lt;t&lowbar;PROT&gt;&gt;]`
| This class allows an object that is currently managed by a `shared&lowbar;ptr` to safely generate a copy of the managing `shared&lowbar;ptr` object&period; Inheriting from `enable&lowbar;shared&lowbar;from&lowbar;this&lt;ELEMENT&lowbar;TYPE&gt;` provides the (template parameter) `ELEMENT&lowbar;TYPE` type with a member function `shared&lowbar;from&lowbar;this`&period; If an object of type `ELEMENT&lowbar;TYPE` is managed by a `shared&lowbar;ptr` then calling `shared&lowbar;from&lowbar;this` will return a `shared&lowbar;ptr&lt;ELEMENT&lowbar;TYPE&gt;` that shares ownership of that object&period; It is undefined behavior to call `shared&lowbar;from&lowbar;this` on an object unless that object is managed by a `shared&lowbar;ptr`&period;
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlmt/Signaler_Node/2constructor.adoc[`Signaler&lowbar;Node`]         [.small]#[constructor]#
| Create a `Signaler&lowbar;Node` object having no connected slots&period; Specify an `allocator` used to supply memory&period; Note that the supplied allocator must remain valid until all connection objects associated with this signaler are destroyed&period;
| xref:BloombergLP/bdlmt/Signaler_Node/connect.adoc[`connect`] 
| Implements `Signaler&colon;&colon;connect`&period; Connect the specified `slot`, a callable object which must meet the `Slot Object Requirements` described in the component documentation, to this signaler&period; Specify a `group` used to order slots upon invocation&period; Return an instance of `SignalerConnection` representing the created connection&period; This function meets the strong exception guarantee&period; Note that the connected slot may be called by a signal emitted from another thread before this function completes&period; Also note that it is unspecified whether connecting a slot while the signaler is emitting will result in the slot being called immediately&period; Note that `t&lowbar;FUNC` may have a return type other than `void`, but in that case, when the slot is called, the return value will be discarded&period;
| xref:BloombergLP/bdlmt/Signaler_Node/disconnectAllSlots.adoc[`disconnectAllSlots`] 
| Implements `Signaler&colon;&colon;disconnectAllSlots()`&period; Disconnect all slots, if any, connected to this signaler&period; 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&period; Throws nothing&period; Note that this function does not block the calling thread pending completion of ongoing signals emitted on the signaler&period; Also note that it is unspecified how many slots, if any, will be called by any invocation on the signaler that begins before this function completes&period; Also note that if a slot is connected to this signaler during a call to this function, it is unspecified whether that slot will be disconnected&period;
| xref:BloombergLP/bdlmt/Signaler_Node/disconnectAllSlotsAndWait.adoc[`disconnectAllSlotsAndWait`] 
| Implements `Signaler&colon;&colon;disconnectAllSlotsAndWait`&period; Disconnect all slots, if any, connected to this signaler&period; 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&period; This function blocks the calling thread pending completion of all ongoing signals being emitted on the signaler&period; Throws nothing&period; The behavior is undefined if this method is called from a slot connected to the signaler&period; Note that it is unspecified how many slots, if any, will be called by any invocation on the signaler that begins before this function completes&period; Also note that if a slot is connected to this signaler during a call to this function, it is unspecified whether that slot will be disconnected&period;
| xref:BloombergLP/bdlmt/Signaler_Node/disconnectGroup.adoc[`disconnectGroup`] 
| Implements `Signaler&colon;&colon;disconnectGroup()`&period; Disconnect all slots, if any, connected to this signaler in the specified `group`&period; 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&period; Throws nothing&period; Note that this function does not block the calling thread pending completion of ongoing signals emitted on the signaler&period; Also note that it is unspecified how many affected slots, if any, will be signalled to by any invocation on the signaler that begins before this function completes&period; Also note that if a slot in `group` is connected to this signaler during a call to this function, it is unspecified whether that slot will be disconnected&period;
| xref:BloombergLP/bdlmt/Signaler_Node/disconnectGroupAndWait.adoc[`disconnectGroupAndWait`] 
| Implements `Signaler&colon;&colon;disconnectGroupAndWait()`&period; Disconnect all slots, if any, connected to this signaler in the specified `group`&period; 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&period; This function blocks the calling thread pending completion of ongoing signals being emitted on the signaler&period; Throws nothing&period; The behavior is undefined if this method is called from a slot connected to the signaler&period; Note that it is unspecified how many affected slots, if any, will be signaled to by any emission on the signaler that begins before this function completes&period; Also note that if a slot in `group` is connected to this signaler during a call to this function, it is unspecified whether that slot will be disconnected&period;
| xref:BloombergLP/bdlmt/Signaler_Node/invoke.adoc[`invoke`] 
| Called by `Signaler&lowbar;Invocable`s call operators, passing the specified `arg1`, `arg2`, `arg3`, `arg4`, `arg5`, `arg6`, `arg7`, `arg8` and `arg9` on to the slots&period;
| xref:BloombergLP/bdlmt/Signaler_Node/notifyDisconnected.adoc[`notifyDisconnected`] 
| Notify this signaler that a slot with the specified `slotMapKey` was disconnected&period; Throws nothing&period;
| xref:bsl/enable_shared_from_this/shared_from_this-0a2.adoc[`shared&lowbar;from&lowbar;this`] 
| `shared&lowbar;from&lowbar;this` overloads
| xref:BloombergLP/bdlmt/Signaler_Node/slotCount.adoc[`slotCount`] 
| Implements `Signaler&colon;&colon;slotCount()`&period; Return the number of slots connected to this signaler&period; Note that in multithreaded environment, the value returned by `slotCount()` is approximate&period;
| xref:BloombergLP/bdlmt/Signaler_Node/synchronizeWait.adoc[`synchronizeWait`] 
| Block until all signals currently being emitted on the signaler have completed&period;
| xref:bsl/enable_shared_from_this/weak_from_this-0e.adoc[`weak&lowbar;from&lowbar;this`] 
| `weak&lowbar;from&lowbar;this` overloads
|===


== Protected Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/enable_shared_from_this/operator_assign.adoc[`operator&equals;`] 
| Return `&ast;this`&period; This object is unchanged&period; Note that the specified `rhs` is not used&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
