Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::Signal< Args >::Connection Class Reference

Core class that represents a connection attached to a signal. More...

Public Member Functions

 Connection (const Connection &connection)=default
 
 Connection (Connection &&connection) noexcept
 Constructs a Signal::Connection object with by move semantic. More...
 
template<typename... ConnectArgs>
void Connect (BaseClass &signal, ConnectArgs &&... args)
 Connects to a signal with arguments. More...
 
void Disconnect () noexcept
 Disconnects the connection from the signal.
 
bool IsConnected () const
 Checks whether the connection is still active with the signal. More...
 
Connectionoperator= (const Connection &connection)=default
 
Connectionoperator= (Connection &&connection) noexcept
 Constructs a Signal::ConnectionGuard object by move semantic. More...
 

Detailed Description

template<typename... Args>
class Nz::Signal< Args >::Connection

Core class that represents a connection attached to a signal.

Constructor & Destructor Documentation

◆ Connection()

template<typename... Args>
Nz::Signal< Args >::Connection::Connection ( Connection &&  connection)
noexcept

Constructs a Signal::Connection object with by move semantic.

Parameters
connectionConnection object to move

Member Function Documentation

◆ Connect()

template<typename... Args>
template<typename... ConnectArgs>
void Nz::Signal< Args >::Connection::Connect ( BaseClass signal,
ConnectArgs &&...  args 
)

Connects to a signal with arguments.

Parameters
signalNew signal to listen
argsArguments for the signal

◆ IsConnected()

template<typename... Args>
bool Nz::Signal< Args >::Connection::IsConnected ( ) const

Checks whether the connection is still active with the signal.

Returns
true if signal is still active

◆ operator=()

template<typename... Args>
Signal< Args... >::Connection & Nz::Signal< Args >::Connection::operator= ( Connection &&  connection)
noexcept

Constructs a Signal::ConnectionGuard object by move semantic.

Parameters
connectionConnection to move

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