Go to the previous, next section.
#include <CNCL/EventExploder.h>
CN_EVENTEXPLODER
CNEventHandler
None
CNEvent, CNEventHandler, CNEventScheduler, CNSimTime
CNEventExploder is a subclass derived from CNEventHandler.
It maintains a list of other arbitrary CNEventHandlers and
forwards all received events to all the CNEventHandlers in its
list. This can be used to implement "broadcast"-events.
Constructors:
CNEventExploder();
CNEventExploder(CNParam *param);
In addition to the member functions required by CNCL,
CNEventExploder provides the following member functions:
virtual void event_handler(const CNEvent *ev);
CNEventHandlers.
virtual void add_handler(CNEventHandler *eh);
CNEventHandler to the list. It will then
receive all events that are send to the CNEventExploder.
If a CNEventHandler is added more than once, it will also receive
all events as many times.
virtual void rem_handler(CNEventHandler *eh);
CNEventHandler from the
list. It will no longer receive events managed by the CNEventExploder.
If a CNEventHandler has been added more than once, it also has to
be removed as many times to be completely removed from the
CNEventExploder.
Go to the previous, next section.