Inheritance diagram for lestes::std::broadcaster< T, Y >:
Public Member Functions
|void||broadcast (ptr< T > what)|
|Inform the listeners, that the event has occured on the parameter. |
|void||attach (ptr< broadcast_listener< Y > > listener)|
|Register with the broadcaster to listen for the events. |
Static Public Member Functions
|static ptr< broadcaster< T,|
Y > >
|Create the broadcaster/event. |
Protected Member Functions
|Marks the keystone. |
|srp< list< srp< broadcast_listener<|
Y > > > >
The concept of broadcasting is very similar to the concept of events. At a certain point of the program's run there occurs an important event. Such events can be divided into several categories. The first category of events, and by far the most numerous, is the category that encompasses all events that spring from a single source. These events are represented by the class event, q.v. The second category consists of events, that affect an object of a given type. These events could represent the creation / alteration / destruction of an object. The second category of events need not necesarily come from a single source. The remaining kinds of events are not discussed here.
The second category of events, i.e. the events affecting a single object, can be handled by a simple means: all parties interested in the event would enqueue themselves in a designated place. Then, at the moment of the event, the designated place will be accessed and all enqueued listeners would be notified. The mechanics involved are the same as for the first category. However, the affected object shall be announced to the listeners as well.
|lestes::std::broadcaster< T, Y >::broadcaster||(||)||
|void lestes::std::broadcaster< T, Y >::broadcast||(||ptr< T >||what||)||
Inform the listeners, that the event has occured on the parameter.
|void lestes::std::broadcaster< T, Y >::attach||(||ptr< broadcast_listener< Y > >||listener||)||
Register with the broadcaster to listen for the events.
|static ptr< broadcaster < T, Y > > lestes::std::broadcaster< T, Y >::create||(||void||)||
Create the broadcaster/event.
|void lestes::std::broadcaster< T, Y >::gc_mark||(||void||)||
Marks the keystone.
Marks all directly reachable parts of the class. The method must be overriden for each inherited class. It should contain abc.gc_mark() for each field abc of the inherited class and call to gc_mark() of the direct ancestor of the class. Does nothing for keystone, only stops processing of ancestors.
Reimplemented from lestes::std::mem::keystone.
|srp< list < srp < broadcast_listener < Y > > > > lestes::std::broadcaster< T, Y >::listeners