Gyoto
Classes | Namespaces
GyotoHooks.h File Reference

Tellers tell Listeners when they mutate. More...

Go to the source code of this file.

Classes

class  Gyoto::Hook::Listener
 I might listen to a Teller. More...
 
class  Gyoto::Hook::Teller
 Listen to me and I'll warn you when I change. More...
 

Namespaces

 Gyoto::Hook
 Listeners attach to Tellers.
 
 Gyoto
 Namespace for the Gyoto library.
 

Detailed Description

Tellers tell Listeners when they mutate.

A Listener can hook() to a Teller. The Teller will tell it when it mutates using Listener::tell(), usually through the highter lever Teller::tellListeners(). The Listener can later unhook(). The Listener must therefore implement Listener::tell() to react when it is told.