Inheritance diagram for ActiveNotifier:

ActiveNotifier, whose base class is Notifier, combines a basic activity signal with the ability to wake up any dependent Task objects when that signal becomes active. Notifier clients are called listeners. Each listener corresponds to a Task object. The listener generally goes to sleep -- i.e., becomes unscheduled -- when it runs out of work and the corresponding activity signal is inactive. The ActiveNotifier class will wake up the listener when it becomes active by rescheduling the relevant Task.
Elements that contain ActiveNotifier objects will generally override Element::cast() or Element::port_cast(), allowing other parts of the configuration to find the Notifiers.
Public Member Functions | |
| ActiveNotifier (SearchOp op=SEARCH_STOP) | |
| Construct an ActiveNotifier. | |
| ~ActiveNotifier () | |
| Destroy an ActiveNotifier. | |
| int | add_listener (Task *task) |
| Add a listener to this notifier. | |
| void | remove_listener (Task *task) |
| Remove a listener from this notifier. | |
| int | add_dependent_signal (NotifierSignal *signal) |
| Add a dependent signal to this Notifier. | |
| void | listeners (Vector< Task * > &v) const |
| Return the listener list. | |
| void | set_active (bool active, bool schedule=true) |
| Sets the associated signal's activity, possibly scheduling any listener tasks. | |
| void | wake () |
| Sets the associated signal to active and schedules any listener tasks. | |
| void | sleep () |
| Sets the associated signal to inactive. | |
Classes | |
| union | task_or_signal_t |
| ActiveNotifier::ActiveNotifier | ( | SearchOp | op = SEARCH_STOP |
) |
Construct an ActiveNotifier.
| op | controls notifier path search |
| ActiveNotifier::~ActiveNotifier | ( | ) |
Destroy an ActiveNotifier.
| int ActiveNotifier::add_listener | ( | Task * | task | ) | [virtual] |
Add a listener to this notifier.
| task | the listener to add |
Reimplemented from Notifier.
| void ActiveNotifier::remove_listener | ( | Task * | task | ) | [virtual] |
| int ActiveNotifier::add_dependent_signal | ( | NotifierSignal * | signal | ) | [virtual] |
Add a dependent signal to this Notifier.
| signal | the dependent signal |
Reimplemented from Notifier.
| void ActiveNotifier::listeners | ( | Vector< Task * > & | v | ) | const |
Return the listener list.
| [out] | v | collects listener tasks |
| void ActiveNotifier::set_active | ( | bool | active, | |
| bool | schedule = true | |||
| ) | [inline] |
Sets the associated signal's activity, possibly scheduling any listener tasks.
| active | true iff the signal should be active | |
| schedule | if true, wake up listener tasks |
| void ActiveNotifier::wake | ( | ) | [inline] |
Sets the associated signal to active and schedules any listener tasks.
If the signal was previously inactive, then any listener Tasks are scheduled with Task::reschedule().
Reimplemented from Notifier.
| void ActiveNotifier::sleep | ( | ) | [inline] |
1.5.1