OpenLexocad  27.1
entt::scoped_connection Struct Reference

Scoped connection class. More...

#include <entt.hpp>

Inheritance diagram for entt::scoped_connection:
entt::connection

Public Member Functions

 scoped_connection ()=default
 Default constructor. More...
 
 scoped_connection (const connection &conn)
 Constructs a scoped connection from a basic connection. More...
 
 scoped_connection (const scoped_connection &)=delete
 Default copy constructor, deleted on purpose. More...
 
 scoped_connection (scoped_connection &&)=default
 Default move constructor. More...
 
 ~scoped_connection ()
 Automatically breaks the link on destruction. More...
 
scoped_connectionoperator= (const scoped_connection &)=delete
 Default copy assignment operator, deleted on purpose. More...
 
scoped_connectionoperator= (scoped_connection &&)=default
 Default move assignment operator. More...
 
scoped_connectionoperator= (const connection &other)
 Copies a connection. More...
 
scoped_connectionoperator= (connection &&other)
 Moves a connection. More...
 
void release ()
 Breaks the connection. More...
 

Detailed Description

Scoped connection class.

Opaque object the aim of which is to allow users to release an already estabilished connection without having to keep a reference to the signal or the sink that generated it.
A scoped connection automatically breaks the link between the two objects when it goes out of scope.

Constructor & Destructor Documentation

◆ scoped_connection() [1/4]

entt::scoped_connection::scoped_connection ( )
default

Default constructor.

◆ scoped_connection() [2/4]

entt::scoped_connection::scoped_connection ( const connection conn)
inline

Constructs a scoped connection from a basic connection.

Parameters
connA valid connection object.

◆ scoped_connection() [3/4]

entt::scoped_connection::scoped_connection ( const scoped_connection )
delete

Default copy constructor, deleted on purpose.

◆ scoped_connection() [4/4]

entt::scoped_connection::scoped_connection ( scoped_connection &&  )
default

Default move constructor.

◆ ~scoped_connection()

entt::scoped_connection::~scoped_connection ( )
inline

Automatically breaks the link on destruction.

Member Function Documentation

◆ operator=() [1/4]

scoped_connection& entt::scoped_connection::operator= ( const scoped_connection )
delete

Default copy assignment operator, deleted on purpose.

Returns
This scoped connection.

◆ operator=() [2/4]

scoped_connection& entt::scoped_connection::operator= ( scoped_connection &&  )
default

Default move assignment operator.

Returns
This scoped connection.

◆ operator=() [3/4]

scoped_connection& entt::scoped_connection::operator= ( const connection other)
inline

Copies a connection.

Parameters
otherThe connection object to copy.
Returns
This scoped connection.

◆ operator=() [4/4]

scoped_connection& entt::scoped_connection::operator= ( connection &&  other)
inline

Moves a connection.

Parameters
otherThe connection object to move.
Returns
This scoped connection.

◆ release()

void entt::connection::release
inline

Breaks the connection.


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