ETViewpointTrait class documentation

Authors

Quentin Mathe (quentin.mathe@gmail.com)

Copyright: (C) 2007 Quentin Mathe


Contents -

  1. Software documentation for the ETViewpointTrait class
  2. Software documentation for the NSObject(ETViewpointAdditions) informal protocol
  3. Software documentation for the ETPropertyViewpoint protocol
  4. Software documentation for the ETViewpoint protocol
  5. Software documentation for the ETViewpointMutation protocol

Software documentation for the ETViewpointTrait class

ETViewpointTrait : NSObject

Declared in:
ETViewpoint.h
Conforms to:
ETViewpoint
Description forthcoming.
Method summary

applyMutableViewpointTraitForValue: 

- (void) applyMutableViewpointTraitForValue: (id)aValue;
Description forthcoming.

isMutableValue 

- (BOOL) isMutableValue;

@taskunit Mutability Trait


isViewpoint 

- (BOOL) isViewpoint;

Returns YES.


unapplyMutableViewpointTraitForValue: 

- (void) unapplyMutableViewpointTraitForValue: (id)aValue;
Description forthcoming.

Software documentation for the NSObject(ETViewpointAdditions) informal protocol

NSObject(ETViewpointAdditions)

Declared in:
ETViewpoint.h
Description forthcoming.
Method summary

isViewpoint 

- (BOOL) isViewpoint;

Returns NO.


setValue: forContentKey: 

- (void) setValue: (id)aValue forContentKey: (NSString*)key;
Description forthcoming.

setValue: forContentKeyPath: 

- (void) setValue: (id)aValue forContentKeyPath: (NSString*)aKeyPath;
Description forthcoming.

valueForContentKey: 

- (id) valueForContentKey: (NSString*)key;
Description forthcoming.

valueForContentKeyPath: 

- (id) valueForContentKeyPath: (NSString*)aKeyPath;
Description forthcoming.

Software documentation for the ETPropertyViewpoint protocol

ETPropertyViewpoint

Declared in:
ETViewpoint.h
Conforms to:
ETViewpoint

@group Viewpoints @abstract A viewpoint protocol to represent an object property.

A property viewpoint is an adaptor that represents an object property and handles reading and writing the property value through -value and -setValue .

Method summary

viewpointWithName: representedObject: 

+ (id) viewpointWithName: (NSString*)key representedObject: (id)object;

Returns a new autoreleased property viewpoint that represents the property identified by the given name in object.


name 

- (NSString*) name;

Returns the name used to declare the property in the represented object.


Software documentation for the ETViewpoint protocol

ETViewpoint

Declared in:
ETViewpoint.h

@group Viewpoints @abstract The base viewpoint protocol.

A viewpoint is an adaptor that exposes a value derived from a represented object and handles reading and writing the properties of this value through -valueForProperty: and -setValue:forProperty: .

The derived value object can be read and write through -value and -setValue: .

Method summary

applyMutableViewpointTraitForValue: 

- (void) applyMutableViewpointTraitForValue: (id)aValue;
Description forthcoming.

isMutableValue 

- (BOOL) isMutableValue;
Description forthcoming.

propertyNames 

- (NSArray*) propertyNames;

Returns the property names exposed through by the viewpoint for -value .


representedObject 

- (id) representedObject;

Returns the adapted object.


setRepresentedObject: 

- (void) setRepresentedObject: (id)object;

Sets the adapted object.


setValue: 

- (void) setValue: (id)objectValue;

Sets the object value resulting from the viewpoint.


setValue: forProperty: 

- (BOOL) setValue: (id)value forProperty: (NSString*)key;

Sets the value bound to a property of the object -value .


unapplyMutableViewpointTraitForValue: 

- (void) unapplyMutableViewpointTraitForValue: (id)aValue;
Description forthcoming.

value 

- (id) value;

Returns the object value resulting from the viewpoint.


valueForProperty: 

- (id) valueForProperty: (NSString*)key;

Returns a value bound to a property of the object -value .


Software documentation for the ETViewpointMutation protocol

ETViewpointMutation

Declared in:
ETViewpoint.h

@group Viewpoints @abstract Protocol to provide a viewpoint that simulates mutability for immutable objects.

For each immutable object class, a distinct ETMutableObjectViewpoint subclass must exist.

Immutable object class that wants to support editing or mutation through a ETMutableObjectViewpoint must implement this protocol.

Method summary

mutableViewpointClass 

+ (Class) mutableViewpointClass;

Returns the ETMutableObjectViewpoint subclass used to mutate the receiver instances.

Must not return Nil.