You.i Engine
CYISignalCallableConnection< CallableType, SignalTypes > Class Template Reference

Detailed Description

template<typename CallableType, typename... SignalTypes>
class CYISignalCallableConnection< CallableType, SignalTypes >

A signal connection class for connection to generic CALLABLE objects, with optional lifetime tracking through a signal handler. The CALLABLE object is stored within pre-allocated memory.

See also
CYISignal
CYISignalLargeCallableConnection

#include <signal/internal/YiSignalCallableConnection.h>

Inheritance diagram for CYISignalCallableConnection< CallableType, SignalTypes >:

Public Types

typedef CallableType YI_SLOT
 

Public Member Functions

template<typename SlotType = CallableType>
 CYISignalCallableConnection (const CYISignalHandler *pSignalHandler, CYIThreadHandle threadAffinity, SlotType &&slot, 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
 

Static Public Attributes

static const size_t Arity = YiFunctionArity<CallableType>::value
 

Protected Attributes

YI_SLOT m_slot
 
- 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

◆ YI_SLOT

template<typename CallableType , typename... SignalTypes>
typedef CallableType CYISignalCallableConnection< CallableType, SignalTypes >::YI_SLOT

The type of slot object held by this connection type.

Constructor & Destructor Documentation

◆ CYISignalCallableConnection()

template<typename CallableType , typename... SignalTypes>
template<typename SlotType = CallableType>
CYISignalCallableConnection< CallableType, SignalTypes >::CYISignalCallableConnection ( const CYISignalHandler pSignalHandler,
CYIThreadHandle  threadAffinity,
SlotType &&  slot,
EYIConnectionType  connectionType,
CYISignalConnectionID  connectionID = CYISignalConnectionID::CreateUnique() 
)
inline

Member Function Documentation

◆ CopyConstructInto()

template<typename CallableType , typename... SignalTypes>
virtual void CYISignalCallableConnection< CallableType, 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<typename CallableType , typename... SignalTypes>
virtual void CYISignalCallableConnection< CallableType, SignalTypes >::Emit ( const SignalTypes &...  args)
inlineoverridevirtual

Emits the signal through this connection object using arguments args.

Implements CYISignalBaseConnection< SignalTypes... >.

◆ MoveConstructInto()

template<typename CallableType , typename... SignalTypes>
virtual void CYISignalCallableConnection< CallableType, 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

◆ Arity

template<typename CallableType , typename... SignalTypes>
const size_t CYISignalCallableConnection< CallableType, SignalTypes >::Arity = YiFunctionArity<CallableType>::value
static

The number of arguments expected by the Callable.

◆ m_slot

template<typename CallableType , typename... SignalTypes>
YI_SLOT CYISignalCallableConnection< CallableType, SignalTypes >::m_slot
protected

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