SourcePro® API Reference Guide

 
List of all members
RWTFunctorR0Imp< SR > Class Template Reference

Deprecated. Abstract base class for the family of functor bodies that take no caller arguments at invocation time and return a value. More...

#include <rw/functor/RWTFunctorR0Imp.h>

Inherits RWTFunctorImpBase0< SR >.

Inherited by RWTFunctorR0GA1Imp< SR, DR, A1 >, RWTFunctorR0GA2Imp< SR, DR, A1, A2 >, RWTFunctorR0GA3Imp< SR, DR, A1, A2, A3 >, RWTFunctorR0GImp< SR, DR >, RWTFunctorR0MA1Imp< SR, Callee, DR, A1 >, RWTFunctorR0MA2Imp< SR, Callee, DR, A1, A2 >, RWTFunctorR0MA3Imp< SR, Callee, DR, A1, A2, A3 >, and RWTFunctorR0MImp< SR, Callee, DR >.

Detailed Description

template<class SR>
class RWTFunctorR0Imp< SR >

Deprecated:
As of SourcePro 12.5, use RWTFunctor<R(As...)> instead.

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

Class RWTFunctorR0Imp is the abstract base class for the family of functor bodies that take no caller arguments at invocation time and return a value.

Each derived class name appends either a G (for global) or an M (for member), to indicate whether it is invoked upon an object. Static member functions use the G version since there is no object associated with the call.

The class name may also append A1, A2, or A3, to indicate that it takes callee arguments at construction time. These arguments are stored and added to the caller argument at invocation time.

The eight concrete class names are:

These concrete classes are templatized on the signature of the function that is encapsulated, as well as on the signature of the functor invocation.

The template parameters describe the invocation signature of the functor and the function call it encapsulates. These parameters are:

The make() function is the only member of these functor classes that is intended to be accessed directly; it is often called through one of the rwtMakeFunctorR0() convenience mechanisms. All other members must be accessed through an RWTFunctorR0 handle.

Example
#include <rw/functor/RWTFunctorR0GA1Imp.h>
float foo(int);
int main(void)
{
// Create a functor that calls foo(7):
RWTFunctorR0GA1Imp<float, float, int>::make(foo, 7);
// Invoke Functor
float result = func();
return 0;
}
See also
rwtMakeFunctorR0(), RWTFunctorR0

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.