4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::signal::base< T > Class Template Reference

Detailed Description

template<typename T>
class fcppt::signal::base< T >

Default base class for signals. Provides no unlinking capabilities.

Template Parameters
TThe signal's function type

See fcppt.signal for more information.

Public Types

using function_signature = T
 A typedef for the function's return type.
 
using function = fcppt::function<T>
 A typedef for the wrapped function.
 

Public Member Functions

 FCPPT_NONCOPYABLE (base)
 
fcppt::signal::auto_connection connect (function &&)
 Connect a callback to this signal.
 
bool empty () const
 Return if the signal has connections attached to it.
 

Protected Types

using concrete_connection = fcppt::signal::detail::concrete_connection<function_signature>
 
using connection_list = fcppt::intrusive::list<concrete_connection>
 

Protected Member Functions

 base ()
 
 base (base &&) noexcept
 
baseoperator= (base &&) noexcept
 
 ~base ()
 
connection_listconnections () const
 

Member Typedef Documentation

◆ concrete_connection

template<typename T >
using fcppt::signal::base< T >::concrete_connection = fcppt::signal::detail::concrete_connection<function_signature>
protected

◆ connection_list

template<typename T >
using fcppt::signal::base< T >::connection_list = fcppt::intrusive::list<concrete_connection>
protected

◆ function

template<typename T >
using fcppt::signal::base< T >::function = fcppt::function<T>

A typedef for the wrapped function.

◆ function_signature

template<typename T >
using fcppt::signal::base< T >::function_signature = T

A typedef for the function's return type.

Constructor & Destructor Documentation

◆ base() [1/2]

template<typename T >
fcppt::signal::base< T >::base ( )
protected

◆ base() [2/2]

template<typename T >
fcppt::signal::base< T >::base ( base< T > && )
protectednoexcept

◆ ~base()

template<typename T >
fcppt::signal::base< T >::~base ( )
protected

Member Function Documentation

◆ connect()

template<typename T >
fcppt::signal::auto_connection fcppt::signal::base< T >::connect ( function && )

Connect a callback to this signal.

◆ connections()

template<typename T >
connection_list & fcppt::signal::base< T >::connections ( ) const
protected

◆ empty()

template<typename T >
bool fcppt::signal::base< T >::empty ( ) const

Return if the signal has connections attached to it.

◆ FCPPT_NONCOPYABLE()

template<typename T >
fcppt::signal::base< T >::FCPPT_NONCOPYABLE ( base< T > )

◆ operator=()

template<typename T >
base & fcppt::signal::base< T >::operator= ( base< T > && )
protectednoexcept