API 0.9.5
CPInvocation Class Reference

An object representation of a message. More...

#import <CPInvocation.h>

Inheritance diagram for CPInvocation:

List of all members.

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

Class Methods

(id) + invocationWithMethodSignature:

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

- (id) argumentAtIndex: (unsigned)  anIndex

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 118 of file CPInvocation.j.

- (void) encodeWithCoder: (CPCoder aCoder

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

Parameters:
aCoderthe coder to which the data will be written

Definition at line 188 of file CPInvocation.j.

- (id) initWithCoder: (CPCoder aCoder

Initializes the invocation with data from a coder.

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

Definition at line 171 of file CPInvocation.j.

- (id) initWithMethodSignature: (CPMethodSignature)  aMethodSignature

Initializes the invocation with a provided method signature

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

Definition at line 54 of file CPInvocation.j.

+ (id) invocationWithMethodSignature: (CPMethodSignature)  aMethodSignature

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 44 of file CPInvocation.j.

- (void) invoke

Sends the encapsulated message to the stored target.

Definition at line 144 of file CPInvocation.j.

- (void) invokeWithTarget: (id)  aTarget

Sends the encapsulated message to the specified target.

Parameters:
thetarget to which the message will be sent

Definition at line 153 of file CPInvocation.j.

- (id) returnValue

Returns the invocation's return value

Definition at line 135 of file CPInvocation.j.

- (SEL) selector

Returns the invocation's selector

Definition at line 80 of file CPInvocation.j.

- (void) setArgument: (id)  anArgument
atIndex: (unsigned)  anIndex 

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 107 of file CPInvocation.j.

- (void) setReturnValue: (id)  aReturnValue

Sets the invocation's return value

Parameters:
theinvocation return value

Definition at line 127 of file CPInvocation.j.

- (void) setSelector: (SEL)  aSelector

Sets the invocation's selector.

Parameters:
theinvocation selector

Definition at line 72 of file CPInvocation.j.

- (void) setTarget: (id)  aTarget

Sets the invocation's target

Parameters:
aTargetthe invocation target

Definition at line 89 of file CPInvocation.j.

- (id) target

Returns the invocation's target

Definition at line 97 of file CPInvocation.j.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines