ObjectiveLib
1.0.0
|
A function object that sends a given message and a given argument to a given object and returns the result. More...
#import <ObjectiveLib/Functional.h>
Public Member Functions | |
(void) | - encodeWithCoder: |
Encode the function object. | |
(id) | - performBinaryFunctionWithArg:andArg: |
Send the stored message to the object referenced by arg1 using arg2 as an additional parameter. | |
(void) | - writeSelfToStream: |
Initializers and Deallocators | |
(id) | - initWithCoder: |
(id) | - initWithObjectInStream: |
(id) | - initWithSelector: |
Initialize the function object with the given selector. | |
Static Public Member Functions | |
(id) | + functorWithSelector: |
Create and return an instance of OLMemFun1. | |
Protected Attributes | |
SEL | sel |
The selector to perform. |
A function object that sends a given message and a given argument to a given object and returns the result.
The selector is stored in the function object and then is invoked by the function object using the given argument as the object to which to send the message.
- (void) encodeWithCoder: | (NSCoder *) | encoder |
Encode the function object.
The function object is saved to an archive using encoder. The function object will be retrieved from the archive using the initializer #initWithCoder:.
encoder | the coder which will save the function object to the archive |
Reimplemented from OLStreamableFunctor.
+ (id) functorWithSelector: | (SEL) | selector |
Create and return an instance of OLMemFun1.
selector | the selector to store for future invocation |
- (id) initWithSelector: | (SEL) | selector |
Initialize the function object with the given selector.
selector | the selector to store for future invocation |
- (id) performBinaryFunctionWithArg: | (id) | arg1 | |
andArg: | (id) | arg2 | |
Send the stored message to the object referenced by arg1 using arg2 as an additional parameter.
The object returned may or may not be owned by the sender of the message, depending on the nature of the message being sent. No attempt is made by the function object to control memory management of the returned object.
arg1 | the object to which to send the message |
arg2 | the argument to send along with the message |
Reimplemented from <OLBinaryFunction>.
- (SEL) sel [protected] |
The selector to perform.
|