KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KDBindings::ScopedConnection Class Reference

A ScopedConnection is a RAII-style way to make sure a Connection is disconnected. More...

#include <signal.h>

Public Member Functions

 ScopedConnection ()=default
 A ScopedConnection can be default constructed.
 
 ScopedConnection (ConnectionHandle &&h)
 
 ScopedConnection (const ScopedConnection &)=delete
 
 ScopedConnection (ScopedConnection &&)=default
 
 ~ScopedConnection ()
 
ConnectionHandlehandle ()
 
const ConnectionHandlehandle () const
 
ConnectionHandleoperator-> ()
 
const ConnectionHandleoperator-> () const
 
ScopedConnectionoperator= (ConnectionHandle &&h)
 
ScopedConnectionoperator= (const ScopedConnection &)=delete
 
ScopedConnectionoperator= (ScopedConnection &&other)
 

Detailed Description

A ScopedConnection is a RAII-style way to make sure a Connection is disconnected.

When the ScopedConnections scope ends, the connection this ScopedConnection guards will be disconnected.

Example:

Definition at line 532 of file signal.h.

Constructor & Destructor Documentation

◆ ScopedConnection() [1/4]

KDBindings::ScopedConnection::ScopedConnection ( )
default

A ScopedConnection can be default constructed.

A default constructed ScopedConnection has no connection to guard. Therefore it does nothing when it is destructed, unless a ConnectionHandle is assigned to it.

◆ ScopedConnection() [2/4]

KDBindings::ScopedConnection::ScopedConnection ( ScopedConnection &&  )
default

A ScopedConnection can be move constructed

◆ ScopedConnection() [3/4]

KDBindings::ScopedConnection::ScopedConnection ( const ScopedConnection )
delete

A ScopedConnection cannot be copied

◆ ScopedConnection() [4/4]

KDBindings::ScopedConnection::ScopedConnection ( ConnectionHandle &&  h)
inline

A ScopedConnection can be constructed from a ConnectionHandle

Definition at line 562 of file signal.h.

◆ ~ScopedConnection()

KDBindings::ScopedConnection::~ScopedConnection ( )
inline

When a ConnectionHandle is destructed it disconnects the connection it guards.

Definition at line 610 of file signal.h.

Member Function Documentation

◆ handle() [1/2]

ConnectionHandle & KDBindings::ScopedConnection::handle ( )
inline
Returns
the handle to the connection this instance is managing

Definition at line 578 of file signal.h.

◆ handle() [2/2]

const ConnectionHandle & KDBindings::ScopedConnection::handle ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 586 of file signal.h.

◆ operator->() [1/2]

ConnectionHandle * KDBindings::ScopedConnection::operator-> ( )
inline

Convenience access to the underlying ConnectionHandle using the -> operator.

Definition at line 594 of file signal.h.

◆ operator->() [2/2]

const ConnectionHandle * KDBindings::ScopedConnection::operator-> ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 602 of file signal.h.

◆ operator=() [1/3]

ScopedConnection & KDBindings::ScopedConnection::operator= ( ConnectionHandle &&  h)
inline

A ScopedConnection can be assigned from a ConnectionHandle

Definition at line 570 of file signal.h.

◆ operator=() [2/3]

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

A ScopedConnection cannot be copied

◆ operator=() [3/3]

ScopedConnection & KDBindings::ScopedConnection::operator= ( ScopedConnection &&  other)
inline

A ScopedConnection can be move assigned

Definition at line 552 of file signal.h.


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

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8