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

listener::Publisher Class Reference

Class which is responsible of publishing events. More...

#include <publisher.h>

List of all members.

Public Member Functions

int post_event (Event *e)
 Post a new event, which will be delivered to the registered listeners. This is the principal method of this class.
int post_event (Event *e) const
void block_all_events ()
void unblock_all_events ()
bool are_all_events_blocked () const
void dump_publisher (std::ostream &)

Friends

class Subscriber
class Listener


Detailed Description

Class which is responsible of publishing events.

IMPORTANT WARNING

In some cases where there's multiple inheritance, you have to inherits first your class from Publisher. If not, you can have a double memory free...


Member Function Documentation

int listener::Publisher::post_event Event e  ) 
 

Post a new event, which will be delivered to the registered listeners. This is the principal method of this class.

Returns:
the number of time the Event e was really intercepted
Note:
The event will be auto-destroyed after the post.
Usages for posting events:
   class Event1: public Event {} ;

   Publisher* p = new Publisher ;

   p->post_event(new Event1) ;
   // or
   p->igs_emit(Event1) ;


The documentation for this class was generated from the following file:
Generated on Mon Jan 30 11:57:50 2006 for EventListener by  doxygen 1.3.9.1