You.i Engine
CYISignalHandlerConnection< HandlerType, SlotReturnType, YiSlotTypesContainer< SlotTypes... >, SignalTypes... > Class Template Reference

Detailed Description

template<class HandlerType, typename SlotReturnType, typename... SlotTypes, typename... SignalTypes>
class CYISignalHandlerConnection< HandlerType, SlotReturnType, YiSlotTypesContainer< SlotTypes... >, SignalTypes... >

A signal connection class for connection to member functions through std::function objects.

See also
CYISignal

#include <signal/internal/YiSignalHandlerConnection.h>

Inheritance diagram for CYISignalHandlerConnection< HandlerType, SlotReturnType, YiSlotTypesContainer< SlotTypes... >, SignalTypes... >:

Public Types

typedef std::function< SlotReturnType(HandlerType &, const SlotTypes &...)> SlotType
 

Public Member Functions

 CYISignalHandlerConnection (const CYISignalHandler &signalHandler, std::unique_ptr< const SlotType > pSlot, EYIConnectionType connectionType, CYISignalConnectionID connectionID=CYISignalConnectionID::CreateUnique())
 
virtual void CopyConstructInto (CYISignalConnectionWrapper *pWrapper, CYISignalHandler *pNewSignalHandler, EYIConnectionType newConnectionType) const override
 
virtual void MoveConstructInto (CYISignalConnectionWrapper *pWrapper) override
 
virtual void Emit (const SignalTypes &... args) override
 
- Public Member Functions inherited from CYISignalAbstractConnection
virtual ~CYISignalAbstractConnection ()=default
 
void CopyConstructInto (CYISignalConnectionWrapper *pWrapper) const
 
void CopyConstructInto (CYISignalConnectionWrapper *pWrapper, CYISignalHandler *pNewSignalHandler) const
 
void CopyConstructInto (CYISignalConnectionWrapper *pWrapper, EYIConnectionType newConnectionType) const
 
CYISignalHandlerGetSignalHandler () const
 
EYIConnectionType GetConnectionType () const
 
CYIThreadHandle GetThreadAffinity () const
 
bool IsIdentifiedBy (CYISignalConnectionID connectionID) const
 
CYISignalConnectionID GetConnectionID () const
 

Protected Attributes

std::unique_ptr< const SlotTypem_pSlot
 
- Protected Attributes inherited from CYISignalAbstractConnection
CYISignalHandler *const m_pSignalHandler
 
const CYIThreadHandle m_threadAffinity
 
const CYISignalConnectionID m_connectionID
 
const EYIConnectionType m_connectionType
 

Additional Inherited Members

- Protected Member Functions inherited from CYISignalBaseConnection< SignalTypes... >
 CYISignalBaseConnection (CYISignalHandler *pSignalHandler, CYIThreadHandle threadAffinity, EYIConnectionType connectionType, CYISignalConnectionID connectionID)
 
- Protected Member Functions inherited from CYISignalAbstractConnection
 CYISignalAbstractConnection (CYISignalHandler *pSignalHandler, CYIThreadHandle threadAffinity, EYIConnectionType connectionType, CYISignalConnectionID connectionID)
 

Member Typedef Documentation

◆ SlotType

template<class HandlerType , typename SlotReturnType , typename... SlotTypes, typename... SignalTypes>
typedef std::function<SlotReturnType(HandlerType &, const SlotTypes &...)> CYISignalHandlerConnection< HandlerType, SlotReturnType, YiSlotTypesContainer< SlotTypes... >, SignalTypes... >::SlotType

The type of slot object held by this connection type.

Constructor & Destructor Documentation

◆ CYISignalHandlerConnection()

template<class HandlerType , typename SlotReturnType , typename... SlotTypes, typename... SignalTypes>
CYISignalHandlerConnection< HandlerType, SlotReturnType, YiSlotTypesContainer< SlotTypes... >, SignalTypes... >::CYISignalHandlerConnection ( const CYISignalHandler signalHandler,
std::unique_ptr< const SlotType pSlot,
EYIConnectionType  connectionType,
CYISignalConnectionID  connectionID = CYISignalConnectionID::CreateUnique() 
)
inline

Member Function Documentation

◆ CopyConstructInto()

template<class HandlerType , typename SlotReturnType , typename... SlotTypes, typename... SignalTypes>
virtual void CYISignalHandlerConnection< HandlerType, SlotReturnType, YiSlotTypesContainer< SlotTypes... >, SignalTypes... >::CopyConstructInto ( CYISignalConnectionWrapper pWrapper,
CYISignalHandler pNewSignalHandler,
EYIConnectionType  newConnectionType 
) const
inlineoverridevirtual

Copies the data from this object into a placement-new'ed instance within pWrapper.

Implements CYISignalAbstractConnection.

◆ Emit()

template<class HandlerType , typename SlotReturnType , typename... SlotTypes, typename... SignalTypes>
virtual void CYISignalHandlerConnection< HandlerType, SlotReturnType, YiSlotTypesContainer< SlotTypes... >, SignalTypes... >::Emit ( const SignalTypes &...  args)
inlineoverridevirtual

Emits the signal through this connection object using arguments args.

Implements CYISignalBaseConnection< SignalTypes... >.

◆ MoveConstructInto()

template<class HandlerType , typename SlotReturnType , typename... SlotTypes, typename... SignalTypes>
virtual void CYISignalHandlerConnection< HandlerType, SlotReturnType, YiSlotTypesContainer< SlotTypes... >, SignalTypes... >::MoveConstructInto ( CYISignalConnectionWrapper pWrapper)
inlineoverridevirtual

Moves the data from this object into a placement-new'ed instance within pWrapper.

Reimplemented from CYISignalAbstractConnection.

Member Data Documentation

◆ m_pSlot

template<class HandlerType , typename SlotReturnType , typename... SlotTypes, typename... SignalTypes>
std::unique_ptr<const SlotType> CYISignalHandlerConnection< HandlerType, SlotReturnType, YiSlotTypesContainer< SlotTypes... >, SignalTypes... >::m_pSlot
protected

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