Documentation

ETCollectionViewpoint class documentation

ETCollectionViewpoint : ETMutableObjectViewpoint <ETKeyedCollection, ETCollectionMutation>

A proxy giving access to a model property as a mutable collection.

AuthorsGenerated by qmathe
Declared inETCollectionViewpoint.h

Overview

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.


Default

- (BOOL) isIndexValuePairCollection
Description forthcoming.

    Controlling Represented Object Access

    - (id <ETCollection>) content

    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.

      - (void) setContent: (id <ETCollection>)aCollection

      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.

        - (void) didUpdate

        Posts an ETSourceDidUpdateNotification which can be intercepted by all the objects that observes the represented object.