BNZAtomicChange
Abstract: An AtomicChange is a single change on some target object, such as seting a new value for a variable.
An AtomicChange is a single change on some target object, such as seting a new value for a variable.
Usually, one will create single objects for each event that encapsulate single changes of a certain kind.
An implementation of a certain AtomicChange then roughly corresponds to event-strings used to identify
one event in NSNotificationCenter.
For example, imagine a class Person with a method setName. When using the NSNotificationCenter mechanism,
one would define a string constant like PersonNameHasChangedEvent = "personNameHasChangedEvent".
In the BNZTransactionalNotificationCenter framework an implementation of this protocol would
be used not only to identify the type of change (of the variable "name" in this case) but also
to apply the change (with commit) and redo/abort the change (with rollback).
Note that the AtomicChange objects themselves are not controlled by the BNZTransactionalNotificationCenter
framework. So when you call commit or rollback on a change object that is part of an transaction (that may be active, committed
or rolled back) the result is undefined. Therefore, you should neither use these objects directly nor
store them and rely on their correct functioning at a later point.
(Last Updated 8/31/2006)
HTML documentation generated by HeaderDoc