[#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&period; 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&period; 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&period;

== Synopsis

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

[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&equals;`] 
| Assignment operators
| xref:BloombergLP/bdlmt/SignalerConnection/disconnect.adoc[`disconnect`] 
| Disconnect the associated slot&period; If the slot was already disconnected, this function has no effect&period; This function returns immediately without waiting on any calls to the signaler that may be in progress&period; Any signal emitted on the corresponding signaler that happens after this call to `disconnect` completes will not emit to the slot&period; Throws nothing&period; Note that it is unspecified if any signal that is emitted before this function completes will call the slot&period;
| xref:BloombergLP/bdlmt/SignalerConnection/disconnectAndWait.adoc[`disconnectAndWait`] 
| Disconnect the associated slot&period; If the slot was already disconnected, this function has no effect&period; 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&period; Any signal emitted on the corresponding signaler that happens after this call to `disconnect` completes will not emit to the slot&period; Throws nothing&period; The behavior is undefined if this method is called from any slot&period; Note that it is unspecified if any signal emitted on the signaler that begins before this function completes will call the slot&period;
| xref:BloombergLP/bdlmt/SignalerConnection/isConnected.adoc[`isConnected`] 
| Return `true` if the associated slot is connected to the signaler `&ast;this` was obtained from, and `false` otherwise&period; If `&ast;this` does not have an associated slot (i&period;e&period;, was default&hyphen;constructed), return `false`&period;
| xref:BloombergLP/bdlmt/SignalerConnection/reset.adoc[`reset`] 
| Disassociate this connection object from its associated slot, if any, and reset `&ast;this` to a default&hyphen;constructed state&period; Throws nothing&period;
| xref:BloombergLP/bdlmt/SignalerConnection/swap.adoc[`swap`] 
| Swap the contents of `&ast;this` and the specified `other`&period; Throws nothing&period;
| xref:BloombergLP/bdlmt/SignalerConnection/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;SignalerConnection, IsBitwiseMoveable&gt;`] 
| Declare that this type is bitwise moveable&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlmt/operator_eq.adoc[BloombergLP::bdlmt::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` referring to the same slot and `false` otherwise&period;
| `xref:BloombergLP/bdlmt/operator_lt.adoc[BloombergLP::bdlmt::operator&lt;]`
| Return `true` if the specified `lhs` is less than the specified `rhs` and `false` otherwise&period;
| `xref:BloombergLP/bdlmt/Signaler_Node.adoc[BloombergLP::bdlmt::Signaler&lowbar;Node]`
| 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;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlmt/operator_not_eq.adoc[`operator!&equals;`]
| Return `false` if the specified `lhs` and `rhs` referring to the same slot and `true` otherwise&period;
| xref:BloombergLP/bdlmt/operator_le.adoc[`operator&lt;&equals;`]
| Return `true` if the specified `lhs` is less than or equal to the specified `rhs` and `false` otherwise&period;
| xref:BloombergLP/bdlmt/operator_gt.adoc[`operator&gt;`]
| Return `true` if the specified `lhs` is grater than the specified `rhs` and `false` otherwise&period;
| xref:BloombergLP/bdlmt/operator_ge.adoc[`operator&gt;&equals;`]
| Return `true` if the specified `lhs` is greater than or equal to the specified `rhs` and `false` otherwise&period;
| xref:BloombergLP/bdlmt/swap-09.adoc[`swap`]
| Swap the contents of the specified `a` and `b`&period; Throws nothing&period;
|===


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