[Design] Re: Design Digest, Vol 29, Issue 4
Andi Vajda
vajda at osafoundation.org
Sat Mar 4 13:53:19 PST 2006
> Philippe Bossut wrote:
> (a) modify the item attributes so that it will appear in the collection
> as a result of the query
> - or -
> (b) be added to the collection as a specific inclusion
This is quite easy to implement. For an item to be explicitely added to a
collection, that collection has to implement an 'add' method. On the
Collection base class, 'add' is not implemented since most collections are
based off abstract sets, that is, they are computed and that conflicts with
explicitely 'add'ing items.
For example, for an item to appear in a KindCollection, it has to be made in
that kind (or changed to it via stamping).
The InclusionExclusionCollection class, however, does implement 'add' and
'remove'. With that implementation, it can decide whether to force an
attribute value to fit a filter expression or whether to append the item to
its inclusions ListCollection, bypassing the filter.
Andi..
More information about the Design
mailing list