Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TSE3::Impl::Event< interface_type, listener_func, p1_type, p2_type, p3_type, p4_type > Class Template Reference

#include <Notifier.h>

Collaboration diagram for TSE3::Impl::Event< interface_type, listener_func, p1_type, p2_type, p3_type, p4_type >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Event (listener_func func, const p1_type &p1=p1_type(), const p2_type &p2=p2_type(), const p3_type &p3=p3_type(), const p4_type &p4=p4_type())
void callOnEvery (void_list &listeners)

Detailed Description

template<class interface_type, typename listener_func, typename p1_type = def_type, typename p2_type = def_type, typename p3_type = def_type, typename p4_type = def_type>
class TSE3::Impl::Event< interface_type, listener_func, p1_type, p2_type, p3_type, p4_type >

The Event class is an internal part of the Notifier/Listener framework, used to multicast a particular event to a set of Listener objects.

It is a class that can 'hold' zero or more parameters. The upper limit is set by the number of template parameters and member functions - more can be added if you really need them.

If a parameter is not needed, the template declaration will provide def_type which counts as 'no parameter'.


Constructor & Destructor Documentation

template<class interface_type, typename listener_func, typename p1_type = def_type, typename p2_type = def_type, typename p3_type = def_type, typename p4_type = def_type>
TSE3::Impl::Event< interface_type, listener_func, p1_type, p2_type, p3_type, p4_type >::Event listener_func  func,
const p1_type &  p1 = p1_type(),
const p2_type &  p2 = p2_type(),
const p3_type &  p3 = p3_type(),
const p4_type &  p4 = p4_type()
[inline, explicit]
 

Ctor. You specify the member function of the interface_type class to call, and the parameters to call it with.


Member Function Documentation

template<class interface_type, typename listener_func, typename p1_type = def_type, typename p2_type = def_type, typename p3_type = def_type, typename p4_type = def_type>
void TSE3::Impl::Event< interface_type, listener_func, p1_type, p2_type, p3_type, p4_type >::callOnEvery void_list listeners  )  [inline]
 

Calls 'func' on the specified set of listeners.

This function delegates to the appropriate method. Which one to call is worked out using the arg_count utility.


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:48:01 2005 for TSE3 by doxygen 1.3.2