DART  6.7.3
dart::common::SlotRegister< T > Class Template Reference

SlotRegister can be used as a public member for connecting slots to a private Signal member. More...

#include <Signal.hpp>

Public Types

using SlotType = typename T::SlotType
 
using SignalType = typename T::SignalType
 

Public Member Functions

 SlotRegister (typename T::SignalType &_signal)
 Constructor given signal. More...
 
Connection connect (const SlotType &_slot)
 Connect a slot to the signal. More...
 

Private Attributes

T::SignalType & mSignal
 Signal. More...
 

Detailed Description

template<typename T>
class dart::common::SlotRegister< T >

SlotRegister can be used as a public member for connecting slots to a private Signal member.

In this way you won't have to write forwarding connect/disconnect boilerplate for your classes.

Member Typedef Documentation

◆ SignalType

template<typename T >
using dart::common::SlotRegister< T >::SignalType = typename T::SignalType

◆ SlotType

template<typename T >
using dart::common::SlotRegister< T >::SlotType = typename T::SlotType

Constructor & Destructor Documentation

◆ SlotRegister()

template<typename T >
dart::common::SlotRegister< T >::SlotRegister ( typename T::SignalType &  _signal)

Constructor given signal.

Member Function Documentation

◆ connect()

template<typename T >
Connection dart::common::SlotRegister< T >::connect ( const SlotType _slot)

Connect a slot to the signal.

Member Data Documentation

◆ mSignal

template<typename T >
T::SignalType& dart::common::SlotRegister< T >::mSignal
private