Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Core class that represents a RAII for a connection attached to a signal. More...
Public Member Functions | |
ConnectionGuard (const Connection &connection) | |
Constructs a Signal::ConnectionGuard object with a connection. More... | |
ConnectionGuard (const ConnectionGuard &connection)=delete | |
ConnectionGuard (Connection &&connection) | |
Constructs a Signal::ConnectionGuard object with a connection by move semantic. More... | |
ConnectionGuard (ConnectionGuard &&connection) noexcept=default | |
~ConnectionGuard () | |
Destructs the object and disconnects the connection. | |
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. | |
Connection & | GetConnection () |
Gets the connection attached to the signal. More... | |
bool | IsConnected () const |
Checks whether the connection is still active with the signal. More... | |
ConnectionGuard & | operator= (const Connection &connection) |
Assigns the connection into this. More... | |
ConnectionGuard & | operator= (const ConnectionGuard &connection)=delete |
ConnectionGuard & | operator= (Connection &&connection) |
Moves the Connection into this. More... | |
ConnectionGuard & | operator= (ConnectionGuard &&connection) noexcept |
Moves the ConnectionGuard into this. More... | |
Core class that represents a RAII for a connection attached to a signal.
Nz::Signal< Args >::ConnectionGuard::ConnectionGuard | ( | const Connection & | connection | ) |
Constructs a Signal::ConnectionGuard object with a connection.
connection | Connection for the scope |
Nz::Signal< Args >::ConnectionGuard::ConnectionGuard | ( | Connection && | connection | ) |
Constructs a Signal::ConnectionGuard object with a connection by move semantic.
connection | Connection for the scope |
void Nz::Signal< Args >::ConnectionGuard::Connect | ( | BaseClass & | signal, |
ConnectArgs &&... | args | ||
) |
Connects to a signal with arguments.
signal | New signal to listen |
args | Arguments for the signal |
Signal< Args... >::Connection & Nz::Signal< Args >::ConnectionGuard::GetConnection | ( | ) |
Gets the connection attached to the signal.
bool Nz::Signal< Args >::ConnectionGuard::IsConnected | ( | ) | const |
Checks whether the connection is still active with the signal.
Signal< Args... >::ConnectionGuard & Nz::Signal< Args >::ConnectionGuard::operator= | ( | const Connection & | connection | ) |
Assigns the connection into this.
connection | Connection to assign into this |
Signal< Args... >::ConnectionGuard & Nz::Signal< Args >::ConnectionGuard::operator= | ( | Connection && | connection | ) |
Moves the Connection into this.
connection | Connection to move in this |
|
noexcept |
Moves the ConnectionGuard into this.
connection | ConnectionGuard to move in this |