|
CeresEngine 0.2.0
A game development framework
|
Connection class. More...
#include <CeresEngine/Foundation/Event.hpp>
Public Member Functions | |
| WeakEventConnection () noexcept | |
| Default constructor. | |
| WeakEventConnection (WeakEventConnection const &)=delete | |
| WeakEventConnection & | operator= (WeakEventConnection const &)=delete |
| WeakEventConnection (WeakEventConnection &&other) noexcept | |
| Move constructor. | |
| WeakEventConnection & | operator= (WeakEventConnection &&other) noexcept |
| Move assign operator. | |
| bool | connected () const noexcept |
| void | disconnect () |
| Disconnect the slot from the connection. | |
Private Member Functions | |
| WeakEventConnection (SPtr< EventDisconnector > const &sharedDisconnector, const std::size_t index) | |
| Create a connection. | |
Private Attributes | |
| WPtr< EventDisconnector > | weakDisconnector |
| Weak pointer to the current disconnector functor. | |
| std::size_t | index |
| Slot index of the connected slot. | |
Friends | |
| template<typename P , typename T , template< typename > typename F> | |
| class | TEvent |
| The event template is a friend of the connection, since it is the only one allowed to create instances using the meaningful constructor. | |
Connection class.
This is used to be able to disconnect slots after they have been connected. Used as return type for the connect method of the events.
|
inlinenoexcept |
Default constructor.
|
delete |
|
inlinenoexcept |
Move constructor.
| other | The instance to move from. |
|
inlineprivate |
Create a connection.
| sharedDisconnector | Disconnector instance that will be used to disconnect the connection when the time comes. A weak pointer to the disconnector will be held within the connection object. |
| index | The slot index of the connection. |
|
inlinenoexcept |
true if the connection is connected to a event object, and false otherwise.
|
inline |
Disconnect the slot from the connection.
If the connection represents a slot that is connected to a event object, calling this method will disconnect the slot from that object. The result of this operation is that the slot will stop receiving calls when the event is invoked.
|
inlinenoexcept |
Move assign operator.
| other | The instance to move from. |
|
delete |
The event template is a friend of the connection, since it is the only one allowed to create instances using the meaningful constructor.
|
private |
Slot index of the connected slot.
|
private |
Weak pointer to the current disconnector functor.