#import <ObjectiveLib/Functional.h>
Inheritance diagram for OLBinaryNegate:

Public Member Functions | |
| (void) | - encodeWithCoder: |
| Encode the function object. | |
| (BOOL) | - performBinaryFunctionWithArg:andArg: |
| Perform the underlying function and return the opposite of its result. | |
| (void) | - writeSelfToStream: |
| Write the object to a stream. | |
Initializers and Deallocators | |
| (void) | - dealloc |
| Finalize the function object and deallocate any allocated memory. | |
| (id) | - initWithBinaryFunction: |
| Initialize the function object with the function that should be negated. | |
| (id) | - initWithCoder: |
| Initialize the function object. | |
| (id) | - initWithObjectInStream: |
| Initialize the object. | |
Static Public Member Functions | |
| (id) | + functorWithBinaryFunction: |
| Create and return an instance of OLBinaryNegate. | |
Protected Attributes | |
| OLStreamableFunctor< OLBoolBinaryFunction > * | fn |
| The function object to be negated. | |
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) functorWithBinaryFunction: | (OLStreamableFunctor< OLBoolBinaryFunction > *) | function |
Create and return an instance of OLBinaryNegate.
The opposite value of the given function will be returned when this object's performBinaryFunctionWithArg:andArg: is called.
| function | the function that OLBinaryNegate will negate |
| - (id) initWithBinaryFunction: | (OLStreamableFunctor< OLBoolBinaryFunction > *) | function |
Initialize the function object with the function that should be negated.
| function | the target function that will be negated |
| - (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.
| - (BOOL) performBinaryFunctionWithArg: | (id) | arg1 | ||
| andArg: | (id) | arg2 | ||
Perform the underlying function and return the opposite of its result.
| arg1 | the first argument to pass to the target function | |
| arg2 | the second argument to pass to the target function |
Reimplemented from < OLBoolBinaryFunction >.
| - (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 object to be negated.
|