clanCore Signals

Classes

class  clan::Signal< FuncType >
 
class  clan::SignalImpl< SlotImplType >
 
class  clan::Slot
 
class  clan::SlotContainer
 
class  clan::SlotImpl
 
class  clan::SlotImplT< FuncType >
 

Functions

 clan::Signal< FuncType >::Signal ()
 
 clan::Slot::Slot ()
 
template<typename T >
 clan::Slot::Slot (T impl)
 
 clan::SlotImpl::SlotImpl ()
 
 clan::SlotImpl::SlotImpl (const SlotImpl &)=delete
 
 clan::SlotImplT< FuncType >::SlotImplT (const std::weak_ptr< SignalImpl< SlotImplT >> &signal, const std::function< FuncType > &callback)
 
virtual clan::SlotImpl::~SlotImpl ()
 
 clan::SlotImplT< FuncType >::~SlotImplT ()
 
template<class R , class T , class... Args>
std::function< R(Args...)> clan::bind_member (T *instance, R(T::*method)(Args...))
 
Slot clan::Signal< FuncType >::connect (const std::function< FuncType > &func)
 
template<typename InstanceType , typename MemberFuncType >
Slot clan::Signal< FuncType >::connect (InstanceType instance, MemberFuncType func)
 
template<typename FuncType , typename CallbackType >
void clan::SlotContainer::connect (Signal< FuncType > &signal, CallbackType func)
 
template<typename FuncType , typename InstanceType , typename MemberFuncType >
void clan::SlotContainer::connect (Signal< FuncType > &signal, InstanceType instance, MemberFuncType func)
 
 clan::Slot::operator bool () const
 
template<typename... Args>
void clan::Signal< FuncType >::operator() (Args... args)
 
SlotImplclan::SlotImpl::operator= (const SlotImpl &)=delete
 

Variables

std::function< FuncType > clan::SlotImplT< FuncType >::callback
 
std::weak_ptr< SignalImpl< SlotImplT > > clan::SlotImplT< FuncType >::signal
 
std::vector< std::weak_ptr< SlotImplType > > clan::SignalImpl< SlotImplType >::slots
 

Detailed Description

Function Documentation

◆ Signal()

template<typename FuncType >
clan::Signal< FuncType >::Signal ( )
inline

◆ Slot() [1/2]

clan::Slot::Slot ( )
inline

◆ Slot() [2/2]

template<typename T >
clan::Slot::Slot ( impl)
inlineexplicit

◆ SlotImpl() [1/2]

clan::SlotImpl::SlotImpl ( )
inline

◆ SlotImpl() [2/2]

clan::SlotImpl::SlotImpl ( const SlotImpl )
delete

◆ SlotImplT()

template<typename FuncType >
clan::SlotImplT< FuncType >::SlotImplT ( const std::weak_ptr< SignalImpl< SlotImplT< FuncType > >> &  signal,
const std::function< FuncType > &  callback 
)
inline

◆ ~SlotImpl()

virtual clan::SlotImpl::~SlotImpl ( )
inlinevirtual

◆ ~SlotImplT()

template<typename FuncType >
clan::SlotImplT< FuncType >::~SlotImplT ( )
inline

◆ bind_member()

template<class R , class T , class... Args>
std::function<R(Args...)> clan::bind_member ( T *  instance,
R(T::*)(Args...)  method 
)

◆ connect() [1/4]

template<typename FuncType >
Slot clan::Signal< FuncType >::connect ( const std::function< FuncType > &  func)
inline

◆ connect() [2/4]

template<typename FuncType >
template<typename InstanceType , typename MemberFuncType >
Slot clan::Signal< FuncType >::connect ( InstanceType  instance,
MemberFuncType  func 
)
inline

◆ connect() [3/4]

template<typename FuncType , typename CallbackType >
void clan::SlotContainer::connect ( Signal< FuncType > &  signal,
CallbackType  func 
)
inline

◆ connect() [4/4]

template<typename FuncType , typename InstanceType , typename MemberFuncType >
void clan::SlotContainer::connect ( Signal< FuncType > &  signal,
InstanceType  instance,
MemberFuncType  func 
)
inline

◆ operator bool()

clan::Slot::operator bool ( ) const
inline

◆ operator()()

template<typename FuncType >
template<typename... Args>
void clan::Signal< FuncType >::operator() ( Args...  args)
inline

◆ operator=()

SlotImpl& clan::SlotImpl::operator= ( const SlotImpl )
delete

Variable Documentation

◆ callback

template<typename FuncType >
std::function<FuncType> clan::SlotImplT< FuncType >::callback

◆ signal

template<typename FuncType >
std::weak_ptr<SignalImpl<SlotImplT> > clan::SlotImplT< FuncType >::signal

◆ slots

template<typename SlotImplType >
std::vector<std::weak_ptr<SlotImplType> > clan::SignalImpl< SlotImplType >::slots