#import <ObjectiveLib/Functional.h>
Inheritance diagram for OLBoolBinder2nd:
Public Member Functions | |
(BOOL) | - performUnaryFunctionWithArg: |
Perform the function of this function object. | |
(void) | - writeSelfToStream: |
Write the object to a stream. | |
Initializers and Deallocators | |
(id) | - free |
(id) | - initWithBoolFunction:andRightArg: |
Initialize the function object. | |
(id) | - initWithObjectInStream: |
Initialize the object. | |
Static Public Member Functions | |
(id) | + functorWithBoolFunction:andRightArg: |
Create and return an instance of OLBoolBinder2nd. | |
Protected Attributes | |
OLStreamableFunctor< OLBoolBinaryFunction > * | fn |
The function to which to bind an argument. | |
id | rght |
The argument to bind. |
This function object binds a given object to the second argument of a given binary function object, thus producing a unary function object.
+ (id) functorWithBoolFunction: | (OLStreamableFunctor< OLBoolBinaryFunction > *) | function | ||
andRightArg: | (id) | right | ||
Create and return an instance of OLBoolBinder2nd.
function | the binary function object to use | |
right | the right or second argument for the binary function object |
- (id) initWithBoolFunction: | (OLStreamableFunctor< OLBoolBinaryFunction > *) | function | ||
andRightArg: | (id) | right | ||
Initialize the function object.
The binary function object and its second argument are stored for later use. When this function object's performUnaryFunctionWithArg: message is sent the argument to the message becomes the first argument to the underlying binary function object and its result is returned. The second argument to the underlying binary function object will be right.
function | the binary function object to use | |
right | the right or second argument for the binary function object |
- (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.
- (BOOL) performUnaryFunctionWithArg: | (id) | arg |
Perform the function of this function object.
Specifically, the underlying binary function object passed to initWithBoolFunction:andRightArg: is called with arg as the first argument and the stored object as the second argument. The result of the binary function is then returned.
arg | the argument to the function |
Reimplemented from < OLBoolUnaryFunction >.
- (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.
- (OLStreamableFunctor<OLBoolBinaryFunction>*) fn [protected] |
The function to which to bind an argument.
- (id) rght [protected] |
The argument to bind.
|