[#BloombergLP-bdlmt-SignalerConnectionGuard] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::SignalerConnectionGuard :relfileprefix: ../../ :mrdocs: This guard type `has a` `SignalerConnection`, through which it can manage a slot, and when it is destroyed or assigned to it will disconnect that slot. It also contains a boolean `waitOnDisconnect` attribute, which determines whether `disconnect` or `disconnectAndWait` is used to disconnect the slot. The `waitOnDisconnect` attribute is set in constructors from a `SignalerConnection` and propagated when move constructing or move assigning a guard to a different guard. == Synopsis Declared in `<bdlmt_signaler.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class SignalerConnectionGuard; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/SignalerConnectionGuard/2constructor-04.adoc[`SignalerConnectionGuard`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlmt/SignalerConnectionGuard/2destructor.adoc[`~SignalerConnectionGuard`] [.small]#[destructor]# | Destroy this object. If a slot is being managed by this object, call `disconnect` or `disconnectAndWait` on it, depending upon the value of `waitOnDisconnect`. | xref:BloombergLP/bdlmt/SignalerConnectionGuard/operator_assign.adoc[`operator=`] | If there is a currently managed slot, call `disconnect` or `disconnectAndWait` on it, depending on the value of the `waitOnDisconnect` state. Make this connection refer to the same slot, if any, as the specified `rhs`, leaving `rhs` in the default‐constructed state. Use the `waitOnDisconnect` state of `rhs`, indicating whether `disconnect()` or `disconnectAndWait()` will be called on the slot managed by this object upon destruction or assignment. Return `*this`. Throws nothing. | xref:BloombergLP/bdlmt/SignalerConnectionGuard/connection.adoc[`connection`] | Return a const reference to the connection held by this object. Throws nothing. | xref:BloombergLP/bdlmt/SignalerConnectionGuard/release.adoc[`release`] | Disassociate this guard from its associated slot, if any, and reset `*this` to a default‐constructed state. Return a connection object referring to the slot, if any, that this guard was associated with prior to this call. Throws nothing. | xref:BloombergLP/bdlmt/SignalerConnectionGuard/swap.adoc[`swap`] | Swap the contents of `*this` and the specified `other`. Throws nothing. | xref:BloombergLP/bdlmt/SignalerConnectionGuard/waitOnDisconnect.adoc[`waitOnDisconnect`] | Return a `bool` that indicates the value that determines whether the slot, if any, managed by this object will be disconnected using `disconnect` or `disconnectAndWait`. Throws nothing. | xref:BloombergLP/bdlmt/SignalerConnectionGuard/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<SignalerConnectionGuard, IsBitwiseMoveable>`] | |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/swap-06.adoc[`swap`] | Swap the contents of the specified `a` and `b`. Throws nothing. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#