API  1.0.0
CPInvocation Class Reference

An object representation of a message. More...

#import <CPInvocation.h>

+ Inheritance diagram for CPInvocation:

Instance Methods

(id) - argumentAtIndex:
 
(void) - encodeWithCoder:
 
(id) - initWithCoder:
 
(id) - initWithMethodSignature:
 
(void) - invoke
 
(void) - invokeWithTarget:
 
(id) - returnValue
 
(SEL) - selector
 
(void) - setArgument:atIndex:
 
(void) - setReturnValue:
 
(void) - setSelector:
 
(void) - setTarget:
 
(id) - target
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(id) - init
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(id) + invocationWithMethodSignature:
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

An object representation of a message.

A CPInvocation is an object representation of a message sent to an object.

Definition at line 2 of file CPInvocation.h.

Method Documentation

◆ argumentAtIndex:()

- (id) argumentAtIndex: (CPUInteger)  anIndex
implementation

Returns the argument at the specified index. Arguments 0 and 1 are self and _cmd respectively. Thus, method arguments start at 2.

Parameters
anIndexthe index of the argument to return
Exceptions
CPInvalidArgumentExceptionif anIndex is greater than or equal to the invocation's number of arguments.

Definition at line 117 of file CPInvocation.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Writes out the invocation's data to the provided coder.

Parameters
aCoderthe coder to which the data will be written

Provided by category CPInvocation(CPCoding).

Definition at line 187 of file CPInvocation.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the invocation with data from a coder.

Parameters
aCoderthe coder from which to obtain initialization data
Returns
the initialized invocation

Provided by category CPInvocation(CPCoding).

Definition at line 170 of file CPInvocation.j.

◆ initWithMethodSignature:()

- (id) initWithMethodSignature: (CPMethodSignature)  aMethodSignature
implementation

Initializes the invocation with a provided method signature

Parameters
aMethodSignaturethe signature of the method to message
Returns
the initialized invocation

Definition at line 53 of file CPInvocation.j.

◆ invocationWithMethodSignature:()

+ (id) invocationWithMethodSignature: (CPMethodSignature)  aMethodSignature
implementation

Returns a new CPInvocation that represents a message to a method.

Parameters
aMethodSignaturethe signature of the method to message
Returns
the new invocation

Definition at line 43 of file CPInvocation.j.

◆ invoke()

- (void) invoke
implementation

Sends the encapsulated message to the stored target.

Definition at line 143 of file CPInvocation.j.

◆ invokeWithTarget:()

- (void) invokeWithTarget: (id)  aTarget
implementation

Sends the encapsulated message to the specified target.

Parameters
thetarget to which the message will be sent

Definition at line 152 of file CPInvocation.j.

◆ returnValue()

- (id) returnValue
implementation

Returns the invocation's return value

Definition at line 134 of file CPInvocation.j.

◆ selector()

- (SEL) selector
implementation

Returns the invocation's selector

Definition at line 79 of file CPInvocation.j.

◆ setArgument:atIndex:()

- (void) setArgument: (id)  anArgument
atIndex: (CPUInteger)  anIndex 
implementation

Sets a method argument for the invocation. Arguments 0 and 1 are self and _cmd.

Parameters
anArgumentthe argument to add
anIndexthe index of the argument in the method

Definition at line 106 of file CPInvocation.j.

◆ setReturnValue:()

- (void) setReturnValue: (id)  aReturnValue
implementation

Sets the invocation's return value

Parameters
theinvocation return value

Definition at line 126 of file CPInvocation.j.

◆ setSelector:()

- (void) setSelector: (SEL)  aSelector
implementation

Sets the invocation's selector.

Parameters
theinvocation selector

Definition at line 71 of file CPInvocation.j.

◆ setTarget:()

- (void) setTarget: (id)  aTarget
implementation

Sets the invocation's target

Parameters
aTargetthe invocation target

Definition at line 88 of file CPInvocation.j.

◆ target()

- (id) target
implementation

Returns the invocation's target

Definition at line 96 of file CPInvocation.j.


The documentation for this class was generated from the following files: