quentin.mathe@gmail.com
)Copyright: (C) 2013 Quentin Mathe
- Declared in:
- ETCollectionViewpoint.h
- Conforms to:
- ETKeyedCollection
- ETCollectionMutation
@group Viewpoints @abstract A proxy giving access to a model property as a mutable collection.
ETCollectionViewpoint turns a collection property belonging to a represented object into a immutable or mutable collection proxy that implements the collection protocols.
Using it as an immutable collection proxy doesn't
bring a lot of benefits. However
ETCollectionViewpoint can use
Key-Value-Coding accessors to support
mutating the collection without implementing
ETCollection and ETCollectionMutation on the
represented object (for the property that holds
the collection).
A model object usually
implements collection protocols providing access
to its dominant/main collection aspect, but the
represent object doesn't support these protocols
to access other collections exposed as properties.
ETCollectionViewpoint exposes these
other collections as the main collection is usually
exposed.
@taskunit Controlling Represented Object Access
Returns the represented property collection.
This is the primitive method to access the underlying collection. ETCollectionViewpoint never accesses the collection in another way. You must do the same in any ETCollectionViewpoint subclasses or categories.
Can be overriden, but -setContent: must be overriden too.
Posts an ETSourceDidUpdateNotification which can be intercepted by all the objects that observes the represented object.
Sets the represented property collection.
This is is the primitive method to access the underlying collection. ETCollectionViewpoint never accesses the collection in another way. You must do the same in any ETCollectionViewpoint subclasses or categories.
Can be overriden, but -content must be overriden too.