template<class ObsT>
class bertini::Event< ObsT, false >
For emission of events from observables.
An observable object probably wants to emit events to notify observers that things are happening. The observers filter the events, at this time by dynamic casting (slow, I know, but it works for now. Premature optimization, etc.) A better method than dynamic casting would be to filter based on a union of bits or something. If you, the reader, want to help make this better, please contact a developer!
Say I am an observable object, and I want to emit an event. Events attach the type of object emitting them, and in fact (a refence to) the emitter itself. So if my type is T, I would do something like NotifyObservers(Event<T>(*this)). Then an Observer can filter based on a heirarchy of event types, etc.
- Template Parameters
-
| ObsT | The Observed type. When emitting an event, you pass in the type of object emitting the event, and the object itself. Then the observer can Get the emitting object, and do (const) stuff to it. |
- See also
- Observable, Observable::NotifyObservers, ADD_BERTINI_EVENT_TYPE, AMPPathAccumulator, AnyEvent