So-Bogus
A c++ sparse block matrix library aimed at Second Order cone problems
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
bogus::Signal< Arg1, Arg2, Arg3 > Struct Template Reference

Signal class, to which an arbitrary number of listeners can be connected. More...

#include <Signal.hpp>

Inheritance diagram for bogus::Signal< Arg1, Arg2, Arg3 >:
bogus::SignalBase< Signal< Arg1, Arg2, Arg3 > >

Public Member Functions

void trigger (Arg1 arg1, Arg2 arg2, Arg3 arg3) const
 Triggers the signal.
 
void disconnectAll ()
 Disconnects all listeners.
 
void connect (typename Traits::Function::Type func)
 Connects the signal to a free function. More...
 
void connect (T &object, typename Traits::template Method< T >::Type member_func)
 Connects the signal to a member function. More...
 
void connect (const Signal< Arg1, Arg2, Arg3 > &other)
 Connects the signal to another Signal. More...
 

Protected Types

typedef std::list< typename
Traits::Callable * > 
Callables
 

Protected Attributes

Callables m_callees
 

Detailed Description

template<typename Arg1, typename Arg2 = void, typename Arg3 = void>
struct bogus::Signal< Arg1, Arg2, Arg3 >

Signal class, to which an arbitrary number of listeners can be connected.

Each time the Signal::trigger() method is called with arguments ( Arg 1, ..., Arg n ), the listener functions are called with those same arguments. The number and types of arguments are determined by the template parameters of the Signal class.

At the moment, only signals with up to 3 parameters are supported.

Member Function Documentation

void bogus::SignalBase< Signal< Arg1, Arg2, Arg3 > >::connect ( typename Traits::Function::Type  func)
inherited

Connects the signal to a free function.

Its signature should be func( Arg 1, ..., Arg n ) ;

void bogus::SignalBase< Signal< Arg1, Arg2, Arg3 > >::connect ( T &  object,
typename Traits::template Method< T >::Type  member_func 
)
inherited

Connects the signal to a member function.

Its signature should be T::member_func( Arg 1, ..., Arg n ) ;

void bogus::SignalBase< Signal< Arg1, Arg2, Arg3 > >::connect ( const Signal< Arg1, Arg2, Arg3 > &  other)
inherited

Connects the signal to another Signal.

It should have the same template parameters


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