Chapter 7
- See the discussion in section
[rec-scope].
- See the discussion in section
[inh-invariance].
- The diamond structure allows for
separating the specification of
an abstract interface of a compound
object,
its functional behavior,
the way it is displayed
and its actual realization.
See section
[diamond].
- Overloading the de-reference operator
allows one to bypass type checking
on the level of the interface class.
Dereferencing results in applying
the function called to the de-referenced
object.
See slides
[sli-7-del-F] and [sli-7-del-A].
- Smart pointers may be introduced
by overloading the de-reference
operator.
They are employed, for example,
in the ODMG-93 standard to implement
transparent references to both transitory
and persistent objects.
(The implementation is left as an exercise.)
- Dynamic role switching may be realized
by introducing a so-called fat abstract
interface class and employing a switch to invoke
a function for the realization
that matches the actual role.
See section
[roles].
- A gadget is an item that may be found
in a graphical user interface.
The interaction between gadgets and windows
takes place by callback functions.
See section
[callback].
- An event is the result of a user action,
such as clicking a mouse button.
A gadget that has been declared sensitive
to a particular user action must be notified
if the corresponding event occurs.
It may then respond with an appropriate
action, if it considers the event of
relevance.
See section
[gadgets].
- See section
[comp-MVC].
- Event-driven control is not exclusive
to window management systems.
It may also be fruitfully applied to
realize the actions occurring in
response to operations of the user.
User-defined events allow for the combination
of system operations and the declaration
of dependent events.
As such, they provide
an elegant means to maintain the integrity
of a system.
See section
[events].