ObjectiveLib  1.0.0
Public Member Functions | Static Public Member Functions | Protected Attributes
OLBinaryNegate Class Reference

A binary function object that negates the action of another binary function object. More...

#import <ObjectiveLib/Functional.h>

Inheritance diagram for OLBinaryNegate:
Inheritance graph
[legend]

List of all members.

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:
Initializers and Deallocators
(id) - initWithCoder:
(id) - initWithBinaryFunction:
 Initialize the function object with the function that should be negated.
(id) - initWithObjectInStream:
(void) - dealloc
 Finalize the function object and deallocate any allocated memory.

Static Public Member Functions

(id) + functorWithBinaryFunction:
 Create and return an instance of OLBinaryNegate.

Protected Attributes

OLStreamableFunctor
< OLBoolBinaryFunction > * 
fn
 The function object to be negated.

Detailed Description

A binary function object that negates the action of another binary function object.

The action message of this object simple returns the opposite of the target function object.


Member Function Documentation

- (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:.

Parameters:
encoderthe coder which will save the function object to the archive

Reimplemented from OLStreamableFunctor.

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.

Note:
If OpenStep is present the returned object will be autoreleased before being returned.
Parameters:
functionthe function that OLBinaryNegate will negate
Returns:
a new functor

Initialize the function object with the function that should be negated.

Parameters:
functionthe target function that will be negated
Returns:
a reference to this function object
- (BOOL) performBinaryFunctionWithArg: (id)  arg1
andArg: (id)  arg2 

Perform the underlying function and return the opposite of its result.

Parameters:
arg1the first argument to pass to the target function
arg2the second argument to pass to the target function
Returns:
the opposite of the target function's result

Reimplemented from <OLBoolBinaryFunction>.


Member Data Documentation

The function object to be negated.


The documentation for this class was generated from the following file:

ObjectiveLibGenerated Sat Feb 15 2014 07:45:34, © 2004-2007 Will Mason