TGUI  0.8-dev
tgui::SignalWrapper< SignalType > Class Template Reference

Wrapper around signals to allow copying and moving. More...

#include <Signal.hpp>

Public Member Functions

 SignalWrapper (std::string &&name)
 Constructor.
 
 SignalWrapper (const SignalWrapper &other)
 Copy constructor that will default initialize the signal (as handlers are not copied)
 
 SignalWrapper (SignalWrapper &&)=default
 Default move constructor.
 
SignalWrapperoperator= (const SignalWrapper &other)
 Copy assignment operator that will default initialize the signal (as handlers are not copied)
 
SignalWrapperoperator= (SignalWrapper &&)=default
 Default move assignment operator.
 
SignalType & operator* () const
 Access the signal.
 
SignalType * operator-> () const
 Access the signal.
 

Detailed Description

template<typename SignalType>
class tgui::SignalWrapper< SignalType >

Wrapper around signals to allow copying and moving.

The signal itself can't be copied of moved. The wrapper will just copy the pointer to the signal when moving but will reset the signal when being copied. A copied widget has no signal handlers at all.


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