Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Threads Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWTFunctorR2<SR,S1,S2>

Module:  Threads   Package:  Functor


RWTFunctorR2 RWHandleBase

Local Index

Members

Header File

#include <rw/functor/functorR2.h>

Description

RWTFunctorR2<SR,S1,S2> represents the group of functors that are invoked with two arguments, and whose invocation returns a value.

A function object, or a functor, is an object that encapsulates a call to an associated global or member function. When a functor is invoked, it calls the associated function.

Instances of RWTFunctorR2 act as handles to functor implementations or bodies. Such implementations are created by using either the rwtMakeFunctorR2() global functions or macros. Each of these methods creates a new body instance, and returns the handle to that instance. See the example below.

Note that although an instance of this class is invoked with two arguments, the encapsulated function may have more arguments.

The additional arguments that will be passed to the encapsulated function are provided to the functor at the time of creation. They are stored within the functor object, and are retrieved at the time of invocation.

Example

Public Typedefs

typedef S1 S1Type;
typedef S2 S2Type;
typedef SR (*CallerSignature)(S1,S2);
typedef SR SRType;

Public Constructors

RWTFunctorR2();
RWTFunctorR2(RWStaticCtor);
RWTFunctorR2(RWTFunctorR2Imp<SR,S1,S2>* functorImp);
RWTFunctorR2(const RWTFunctorR2<SR,S1,S2>& second);

Public Destructor

~RWTFunctorR2();

Public Operators

RWTFunctorR2<SR,S1,S2>& 
operator=(const RWTFunctorR2<SR,S1,S2>& second);
SR 
operator()(S1 s1, S2 s2) const;

Protected Member Function

RWTFunctorR2Imp<SR,S1,S2>&
body() const;

See Also

rwtMakeFunctorR2()



Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.