Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::ScopedConnection Class Reference

Scoped connection that auto-disconnects in a specific scope. More...

#include <Connection.hpp>

Public Member Functions

 ScopedConnection ()=default
 ScopedConnection (Connection &&conn)
 ScopedConnection (ScopedConnection &&) noexcept=default
ScopedConnection & operator= (ScopedConnection &&) noexcept=default
 ScopedConnection (const ScopedConnection &)=delete
ScopedConnection & operator= (const ScopedConnection &)=delete
bool isConnected () const
void disconnect ()
Connection & get ()

Detailed Description

Scoped connection that auto-disconnects in a specific scope.

ScopedConnection is similar to Connection but provides explicit scope-based lifetime management.

Definition at line 159 of file Connection.hpp.

Constructor & Destructor Documentation

◆ ScopedConnection() [1/4]

esengine::ScopedConnection::ScopedConnection ( )
default

◆ ScopedConnection() [2/4]

esengine::ScopedConnection::ScopedConnection ( Connection && conn)
inlineexplicit

Definition at line 163 of file Connection.hpp.

◆ ScopedConnection() [3/4]

esengine::ScopedConnection::ScopedConnection ( ScopedConnection && )
defaultnoexcept

References ScopedConnection().

◆ ScopedConnection() [4/4]

esengine::ScopedConnection::ScopedConnection ( const ScopedConnection & )
delete

References ScopedConnection().

Member Function Documentation

◆ disconnect()

void esengine::ScopedConnection::disconnect ( )
inline

Definition at line 176 of file Connection.hpp.

◆ get()

Connection & esengine::ScopedConnection::get ( )
inline

Definition at line 180 of file Connection.hpp.

◆ isConnected()

bool esengine::ScopedConnection::isConnected ( ) const
inlinenodiscard

Definition at line 172 of file Connection.hpp.

References isConnected().

Referenced by isConnected().

◆ operator=() [1/2]

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

References ScopedConnection().

◆ operator=() [2/2]

ScopedConnection & esengine::ScopedConnection::operator= ( ScopedConnection && )
defaultnoexcept

References ScopedConnection().


The documentation for this class was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/events/Connection.hpp