Gyoto::Hook::Teller Class Reference

Listen to me and I'll warn you when I change. More...

#include <GyotoHooks.h>

Inheritance diagram for Gyoto::Hook::Teller:
Gyoto::Metric::Generic Gyoto::Spectrometer::Generic Gyoto::Metric::KerrBL Gyoto::Metric::KerrKS Gyoto::Metric::Minkowski Gyoto::Metric::NumericalMetricLorene Gyoto::Metric::Python Gyoto::Metric::RezzollaZhidenko Gyoto::Metric::RotStar3_1 Gyoto::Spectrometer::Complex Gyoto::Spectrometer::Uniform

List of all members.

Public Member Functions

 Teller ()
 Default constructor.
 Teller (const Teller &)
 Copy constructor.
virtual ~Teller ()
virtual void hook (Listener *listener)
 Start listening.
virtual void unhook (Listener *listener)
 Stop listening.

Protected Member Functions

virtual void tellListeners ()
 Call tell() on each hooked Listener.

Private Attributes

 Linked list of Listener items.


class Gyoto::Hook::Listener

Detailed Description

Listen to me and I'll warn you when I change.

Listen to me by calling my hook() method.

Member Function Documentation

virtual void Gyoto::Hook::Teller::hook ( Listener listener  )  [virtual]

Start listening.

Use from a Hook::Listener object method:


where "this" is a Listener and "teller" is a Teller.

Use unhook() later to stop listening to a given Teller.

listener pointer to the new listener
virtual void Gyoto::Hook::Teller::tellListeners (  )  [protected, virtual]

Call tell() on each hooked Listener.

Whenever a Teller mutates, it should warn any Listener hooked to it using tellListeners().

virtual void Gyoto::Hook::Teller::unhook ( Listener listener  )  [virtual]

Stop listening.

Use from a Hook::Listener object method:


where "this" is a Listener, "teller" is a Teller, and "this" has called teller->hook(this) previously.

listener pointer to the listener

The documentation for this class was generated from the following file:

Generated on 6 May 2017 for Gyoto by  doxygen 1.6.1