[#BloombergLP-bdlmt-SignalerConnectionGuard]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::SignalerConnectionGuard
:relfileprefix: ../../
:mrdocs:

RAII guard that disconnects a `SignalerConnection` on destruction&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class SignalerConnectionGuard;
----

== Description

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&period; It also contains a boolean `waitOnDisconnect` attribute, which determines whether `disconnect` or `disconnectAndWait` is used to disconnect the slot&period; The `waitOnDisconnect` attribute is set in constructors from a `SignalerConnection` and propagated when move constructing or move assigning a guard to a different guard&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlmt/SignalerConnectionGuard/2constructor-04.adoc[`SignalerConnectionGuard`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlmt/SignalerConnectionGuard/2destructor.adoc[`&#126;SignalerConnectionGuard`] [.small]#[destructor]#
| Destroy this object&period; If a slot is being managed by this object, call `disconnect` or `disconnectAndWait` on it, depending upon the value of `waitOnDisconnect`&period;
| xref:BloombergLP/bdlmt/SignalerConnectionGuard/operator_assign.adoc[`operator&equals;`] 
| Move&hyphen;assign this guard from `rhs`, disconnecting any prior slot&period;
| xref:BloombergLP/bdlmt/SignalerConnectionGuard/connection.adoc[`connection`] 
| Return a const reference to the connection held by this object&period; Throws nothing&period;
| xref:BloombergLP/bdlmt/SignalerConnectionGuard/release.adoc[`release`] 
| Release ownership of the managed connection without disconnecting it&period;
| xref:BloombergLP/bdlmt/SignalerConnectionGuard/swap.adoc[`swap`] 
| Swap the contents of `&ast;this` and `other`&period;
| xref:BloombergLP/bdlmt/SignalerConnectionGuard/waitOnDisconnect.adoc[`waitOnDisconnect`] 
| Return whether this guard waits when disconnecting its slot&period;
| xref:BloombergLP/bdlmt/SignalerConnectionGuard/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;SignalerConnectionGuard, IsBitwiseMoveable&gt;`] 
| Declare that this type is bitwise moveable&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlmt/swap-06.adoc[`swap`]
| Swap the contents of `a` and `b`&period;
|===


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