DelegateMQ
Loading...
Searching...
No Matches
dmq::ScopedConnection Class Reference

RAII wrapper for Connection. Automatically disconnects when it goes out of scope. More...

#include <SignalSafe.h>

Public Member Functions

 ScopedConnection ()=default
 
 ScopedConnection (Connection &&conn)
 
 ~ScopedConnection ()
 
 ScopedConnection (ScopedConnection &&other) noexcept
 
ScopedConnectionoperator= (ScopedConnection &&other) noexcept
 
 ScopedConnection (const ScopedConnection &)=delete
 
ScopedConnectionoperator= (const ScopedConnection &)=delete
 
void Disconnect ()
 
bool IsConnected () const
 

Detailed Description

RAII wrapper for Connection. Automatically disconnects when it goes out of scope.

Constructor & Destructor Documentation

◆ ScopedConnection() [1/4]

dmq::ScopedConnection::ScopedConnection ( )
default

◆ ScopedConnection() [2/4]

dmq::ScopedConnection::ScopedConnection ( Connection && conn)
inline

◆ ~ScopedConnection()

dmq::ScopedConnection::~ScopedConnection ( )
inline

◆ ScopedConnection() [3/4]

dmq::ScopedConnection::ScopedConnection ( ScopedConnection && other)
inlinenoexcept

◆ ScopedConnection() [4/4]

dmq::ScopedConnection::ScopedConnection ( const ScopedConnection & )
delete

Member Function Documentation

◆ Disconnect()

void dmq::ScopedConnection::Disconnect ( )
inline

◆ IsConnected()

bool dmq::ScopedConnection::IsConnected ( ) const
inline

◆ operator=() [1/2]

ScopedConnection & dmq::ScopedConnection::operator= ( const ScopedConnection & )
delete

◆ operator=() [2/2]

ScopedConnection & dmq::ScopedConnection::operator= ( ScopedConnection && other)
inlinenoexcept

The documentation for this class was generated from the following file: