CPObjectCPInvocation
@implementation CPInvocation : CPObject
A CPInvocation
is an object representation of a message sent to an object.
Method Summary | |
---|---|
+(id) | invocationWithMethodSignature:(CPMethodSignature)aMethodSignature Returns a new CPInvocation that represents a message to a method. |
-(id) | initWithCoder:(CPCoder)aCoder Initializes the invocation with data from a coder. |
-(id) | initWithMethodSignature:(CPMethodSignature)aMethodSignature Initializes the invocation with a provided method signature. |
-(id) | argumentAtIndex:(unsigned)anIndex Returns the argument at the specified index. |
-(void) | encodeWithCoder:(CPCoder)aCoder Writes out the invocation's data to the provided coder. |
-(void) | invoke Sends the encapsulated message to the stored target. |
-(void) | invokeWithTarget:(id)aTarget Sends the encapsulated message to the specified target. |
-(id) | returnValue Returns the invocation's return value. |
-(SEL) | selector Returns the invocation's selector. |
-(void) | setArgument:(id)anArgument atIndex:(unsigned)anIndex Sets a method argument for the invocation. |
-(void) | setReturnValue:(id)aReturnValue Sets the invocation's return value. |
-(void) | setSelector:(SEL)aSelector Sets the invocation's selector. |
-(void) | setTarget:(id)aTarget Sets the invocation's target. |
-(id) | target Returns the invocation's target. |
Method Detail |
---|
+(id)invocationWithMethodSignature:(CPMethodSignature)aMethodSignature
CPInvocation
that represents a message to a method.aMethodSignature
- the signature of the method to message-(id)initWithCoder:(CPCoder)aCoder
aCoder
- the coder from which to obtain initialization data-(id)initWithMethodSignature:(CPMethodSignature)aMethodSignature
aMethodSignature
- the signature of the method to message-(id)argumentAtIndex:(unsigned)anIndex
self
and _cmd
respectively. Thus, method arguments start at 2.anIndex
- the index of the argument to returnCPInvalidArgumentException
- if anIndex is greater than or equal to the invocation's number of arguments.-(void)encodeWithCoder:(CPCoder)aCoder
aCoder
- the coder to which the data will be written-(void)invoke
-(void)invokeWithTarget:(id)aTarget
aTarget
-(id)returnValue
-(SEL)selector
-(void)setArgument:(id)anArgument atIndex:(unsigned)anIndex
self
and _cmd
.anArgument
- the argument to addanIndex
- the index of the argument in the method-(void)setReturnValue:(id)aReturnValue
aReturnValue
-(void)setSelector:(SEL)aSelector
aSelector
-(void)setTarget:(id)aTarget
aTarget
- the invocation target-(id)target
Created on Sat Sep 13 14:15:43 PDT 2008