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.
Declared in <bdlmt_signaler.h>
class SignalerConnection;
| Name | Description |
|---|---|
SignalerConnection [constructor] | Constructors |
operator= | Assignment operators |
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. |
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. |
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. |
reset | Disassociate this connection object from its associated slot, if any, and reset *this to a default-constructed state. Throws nothing. |
swap | Swap the contents of *this and the specified other. Throws nothing. |
operator BloombergLP::bslmf::NestedTraitDeclaration<SignalerConnection, IsBitwiseMoveable> | Declare that this type is bitwise moveable. |
| Name | Description |
|---|---|
BloombergLP::bdlmt::operator== | Return true if the specified lhs and rhs referring to the same slot and false otherwise. |
BloombergLP::bdlmt::operator< | Return true if the specified lhs is less than the specified rhs and false otherwise. |
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. |
| Name | Description |
|---|---|
operator!= | Return false if the specified lhs and rhs referring to the same slot and true otherwise. |
operator<= | Return true if the specified lhs is less than or equal to the specified rhs and false otherwise. |
operator> | Return true if the specified lhs is grater than the specified rhs and false otherwise. |
operator>= | Return true if the specified lhs is greater than or equal to the specified rhs and false otherwise. |
swap | Swap the contents of the specified a and b. Throws nothing. |