RAII guard that disconnects a SignalerConnection on destruction.

Synopsis

Declared in <bdlmt_signaler.h>

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. 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.

Member Functions

Name

Description

SignalerConnectionGuard [constructor]

Constructors

~SignalerConnectionGuard [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.

operator=

Move‐assign this guard from rhs, disconnecting any prior slot.

connection

Return a const reference to the connection held by this object. Throws nothing.

release

Release ownership of the managed connection without disconnecting it.

swap

Swap the contents of *this and other.

waitOnDisconnect

Return whether this guard waits when disconnecting its slot.

operator BloombergLP::bslmf::NestedTraitDeclaration<SignalerConnectionGuard, IsBitwiseMoveable>

Declare that this type is bitwise moveable.

Non-Member Functions

Name

Description

swap

Swap the contents of a and b.

Created with MrDocs