E&S CVS Commit: PEAK - Refactored bidirectional association protocol, and data manipulation SPI.

pje at eby-sarna.com pje at eby-sarna.com
Tue Feb 4 13:02:01 EST 2003


Module Name:	PEAK
Committed By:	pje
Date:		Tue Feb  4 18:01:11 UTC 2003

Modified Files:
	PEAK/src/peak/model: structural.py

Log Message:
Refactored bidirectional association protocol, and data manipulation SPI.
Specifically, the '_notifyLink()' and '_notifyUnlink()' methods of feature
objects are always called to perform any modification on the primary side
(i.e. the side whose API was called) and '_link()' and '_unlink()' are now
always called to perform any actual modification of the reference's list.
(This required the addition of an optional "position" parameter to these
methods.)  This should make it easier to incorporate things like observers,
and "specialty" feature types like qualified associations or mappings.

One possible consequence of this refactoring could be reduced performance,
as there are more method calls taking place for many activities.  But in
most applications that manipulate association links, the overhead is
probably negligible compared to the mechanics of persisting those changes
anyway.  (These changes only affect modifications, and only to
association ends.)


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/model/structural.py.diff?r1=1.6&r2=1.7

To generate a diff of this commit:
cvs rdiff -r1.6 -r1.7 PEAK/src/peak/model/structural.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




More information about the source-changes mailing list