[#BloombergLP-bdlmt-SignalerConnection] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::SignalerConnection :relfileprefix: ../../ :mrdocs: This `class` represents a connection between a signaler and a slot. It is a lightweight object that has the ability to query whether the signaler and slot are currently connected, and to disconnect the slot from the signaler. Note that, unless otherwise specified, it is safe to invoke any method of `SignalerConnection` from the context of its associated slot, or any other slot. == Synopsis Declared in `<bdlmt_signaler.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class SignalerConnection; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/SignalerConnection/2constructor-03.adoc[`SignalerConnection`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlmt/SignalerConnection/operator_assign-08.adoc[`operator=`] | Assignment operators | xref:BloombergLP/bdlmt/SignalerConnection/disconnect.adoc[`disconnect`] | Disconnect the associated slot. If the slot was already disconnected, this function has no effect. This function returns immediately without waiting on any calls to the signaler that may be in progress. Any signal emitted on the corresponding signaler that happens after this call to `disconnect` completes will not emit to the slot. Throws nothing. Note that it is unspecified if any signal that is emitted before this function completes will call the slot. | xref:BloombergLP/bdlmt/SignalerConnection/disconnectAndWait.adoc[`disconnectAndWait`] | Disconnect the associated slot. If the slot was already disconnected, this function has no effect. This function blocks the calling thread pending completion of signals emitted on the signaler by any thread, even if the slot was disconnected prior to this call. Any signal emitted on the corresponding signaler that happens after this call to `disconnect` completes will not emit to the slot. Throws nothing. The behavior is undefined if this method is called from any slot. Note that it is unspecified if any signal emitted on the signaler that begins before this function completes will call the slot. | xref:BloombergLP/bdlmt/SignalerConnection/isConnected.adoc[`isConnected`] | Return `true` if the associated slot is connected to the signaler `*this` was obtained from, and `false` otherwise. If `*this` does not have an associated slot (i.e., was default‐constructed), return `false`. | xref:BloombergLP/bdlmt/SignalerConnection/reset.adoc[`reset`] | Disassociate this connection object from its associated slot, if any, and reset `*this` to a default‐constructed state. Throws nothing. | xref:BloombergLP/bdlmt/SignalerConnection/swap.adoc[`swap`] | Swap the contents of `*this` and the specified `other`. Throws nothing. | xref:BloombergLP/bdlmt/SignalerConnection/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<SignalerConnection, IsBitwiseMoveable>`] | Declare that this type is bitwise moveable. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlmt/operator_eq.adoc[BloombergLP::bdlmt::operator==]` | Return `true` if the specified `lhs` and `rhs` referring to the same slot and `false` otherwise. | `xref:BloombergLP/bdlmt/operator_lt.adoc[BloombergLP::bdlmt::operator<]` | Return `true` if the specified `lhs` is less than the specified `rhs` and `false` otherwise. | `xref:BloombergLP/bdlmt/Signaler_Node.adoc[BloombergLP::bdlmt::Signaler_Node]` | 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. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/operator_not_eq.adoc[`operator!=`] | Return `false` if the specified `lhs` and `rhs` referring to the same slot and `true` otherwise. | xref:BloombergLP/bdlmt/operator_le.adoc[`operator<=`] | Return `true` if the specified `lhs` is less than or equal to the specified `rhs` and `false` otherwise. | xref:BloombergLP/bdlmt/operator_gt.adoc[`operator>`] | Return `true` if the specified `lhs` is grater than the specified `rhs` and `false` otherwise. | xref:BloombergLP/bdlmt/operator_ge.adoc[`operator>=`] | Return `true` if the specified `lhs` is greater than or equal to the specified `rhs` and `false` otherwise. | xref:BloombergLP/bdlmt/swap-09.adoc[`swap`] | Swap the contents of the specified `a` and `b`. Throws nothing. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#