#import <ObjectiveLib/Functional.h>
Inheritance diagram for OLUnaryNegate:
Public Member Functions | |
(BOOL) | - performUnaryFunctionWithArg: |
Perform the underlying function and return the opposite of its result. | |
(void) | - writeSelfToStream: |
Write the object to a stream. | |
Initializers and Deallocators | |
(id) | - free |
Finalize the function object and deallocate any allocated memory. | |
(id) | - initWithObjectInStream: |
Initialize the object. | |
(id) | - initWithUnaryFunction: |
Initialize the function object with the function that should be negated. | |
Static Public Member Functions | |
(id) | + functorWithUnaryFunction: |
Create and return an instance of OLUnaryNegate. | |
Protected Attributes | |
OLStreamableFunctor< OLBoolUnaryFunction > * | fn |
The underyling unary function that will be negated. |
The action message of this object simple returns the opposite of the target function object.
- (id) free |
Finalize the function object and deallocate any allocated memory.
+ (id) functorWithUnaryFunction: | (OLStreamableFunctor< OLBoolUnaryFunction > *) | function |
Create and return an instance of OLUnaryNegate.
function | the function that OLUnaryNegate will negate |
- (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) initWithUnaryFunction: | (OLStreamableFunctor< OLBoolUnaryFunction > *) | function |
Initialize the function object with the function that should be negated.
function | the target function that will be negated |
- (BOOL) performUnaryFunctionWithArg: | (id) | arg |
Perform the underlying function and return the opposite of its result.
arg | the argument to pass to the target 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<OLBoolUnaryFunction>*) fn [protected] |
The underyling unary function that will be negated.
|