#import <ObjectiveLib/Functional.h>
Inheritance diagram for OLMemFun:
Public Member Functions | |
(void) | - encodeWithCoder: |
Encode the function object. | |
(id) | - performUnaryFunctionWithArg: |
Send the stored message to the object referenced by arg. | |
(void) | - writeSelfToStream: |
Write the object to a stream. | |
Initializers and Deallocators | |
(id) | - initWithCoder: |
Initialize the function object. | |
(id) | - initWithObjectInStream: |
Initialize the object. | |
(id) | - initWithSelector: |
Initialize the function object with the given selector. | |
Static Public Member Functions | |
(id) | + functorWithSelector: |
Create and return an instance of OLMemFun. | |
Protected Attributes | |
SEL | sel |
The selector to perform. |
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 OLMemFun.
selector | the selector to store for future invocation |
- (id) initWithCoder: | (NSCoder *) | decoder |
Initialize the function object.
This initializer creates a new function object from an archive and returns it.
decoder | the coder which will decode the archived function object |
Reimplemented from OLStreamableFunctor.
- (id) initWithObjectInStream: | (OLObjectInStream *) | stream |
Initialize the object.
Each instance variable is read from stream and all other initialization is performed.
stream | the stream from which to read |
Reimplemented from OLStreamableFunctor.
- (id) initWithSelector: | (SEL) | selector |
Initialize the function object with the given selector.
selector | the selector to store for future invocation |
- (id) performUnaryFunctionWithArg: | (id) | arg |
Send the stored message to the object referenced by arg.
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.
arg | the object to which to send the message |
Reimplemented from < OLUnaryFunction >.
- (void) writeSelfToStream: | (OLObjectOutStream *) | stream |
Write the object to a stream.
All instance variables are written to stream.
stream | the stream to which to write. |
Reimplemented from OLStreamableFunctor.
- (SEL) sel [protected] |
The selector to perform.
|