|
Last change
on this file since e2e035e was e2e035e, checked in by Frederik Heber <heber@…>, 14 years ago |
|
Refactored all Observer stuff into own subfolder and split up into distinct modules.
- Observer/all.hpp is all that's needed.
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * Project: MoleCuilder
|
|---|
| 3 | * Description: creates and alters molecular systems
|
|---|
| 4 | * Copyright (C) 2010 University of Bonn. All rights reserved.
|
|---|
| 5 | * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | /**
|
|---|
| 9 | * \file observer.dox
|
|---|
| 10 | *
|
|---|
| 11 | * Created on: Dec 1, 2011
|
|---|
| 12 | * Author: heber
|
|---|
| 13 | */
|
|---|
| 14 |
|
|---|
| 15 | /** \page pattern-observer
|
|---|
| 16 | *
|
|---|
| 17 | * Basic structure for the observer pattern
|
|---|
| 18 | *
|
|---|
| 19 | * Observers register themselves with the observables to be notified when something changes.
|
|---|
| 20 | * In the Observable code that changes, attributes should be started with OBSERVE;. This macro
|
|---|
| 21 | * locks the observer mechanism while changes are done. At the end of the scope in which the
|
|---|
| 22 | * macro was placed the lock is released. When the last lock is released all changes are
|
|---|
| 23 | * propagated to the observers.
|
|---|
| 24 | *
|
|---|
| 25 | * Each observerable can have sub-observables. When one of these sub-observables changes and
|
|---|
| 26 | * notifies its observers the observable that contains them will also notify its observers.
|
|---|
| 27 | * This passing on of updates is blocked, when the main-observable is in the process of
|
|---|
| 28 | * updating many of its internal sub-observables. This means the update is not passed, if
|
|---|
| 29 | * it is produced while the main-observable itself is within any Observation block.
|
|---|
| 30 | */
|
|---|
| 31 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.