ObjectiveLib
1.0.0
|
A unary function object that negates the action of another unary function object. More...
#import <ObjectiveLib/Functional.h>
Public Member Functions | |
(void) | - encodeWithCoder: |
Encode the function object. | |
(BOOL) | - performUnaryFunctionWithArg: |
Perform the underlying function and return the opposite of its result. | |
(void) | - writeSelfToStream: |
Initializers and Deallocators | |
(id) | - initWithCoder: |
(id) | - initWithObjectInStream: |
(id) | - initWithUnaryFunction: |
Initialize the function object with the function that should be negated. | |
(void) | - dealloc |
Finalize the function object and deallocate any allocated memory. | |
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. |
A unary function object that negates the action of another unary function object.
The action message of this object simple returns the opposite of the target function object.
- (void) dealloc |
Finalize the function object and deallocate any allocated memory.
- (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) functorWithUnaryFunction: | (OLStreamableFunctor< OLBoolUnaryFunction > *) | function |
Create and return an instance of OLUnaryNegate.
function | the function that OLUnaryNegate will negate |
- (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>.
- (OLStreamableFunctor<OLBoolUnaryFunction>*) fn [protected] |
The underyling unary function that will be negated.
|