The Functor2 package includes two subpackages, Functor List and Functor Map. For complete information about the Functor package, see Chapter 8 of the Threads.h++ User's Guide.
The Functor package contains a large family of template classes designed to accommodate global, static, and member function calls with varying numbers of arguments, as shown in Figure 2 and Figure 3. Like many other Threads.h++ packages, the Functor package uses the handle-body idiom. In the hierarchies, the handle classes are on the left and the matching sets of body classes are on the right.
The Functor List subpackage is made up of classes designed for creating functors which are themselves lists of functors to be invoked in turn. Functor list classes are an extension to the functor class hierarchy, as shown in Figure 4.
Class names are constructed from the base name RWTFunctorList for templatized classes or RWFunctorList for the few non-templatized classes by adding 0, 1 or 2 for the number of caller arguments.
The formal template parameters (shown in the hierarchy) include:
S1 - The type of the functor list's first argument.
S2 - The type of the functor list's second argument.
NOTE: Functor lists do not provide R0, R1, or R2 classes.
The Functor Map subpackage is made up of classes designed for creating functors which are themselves a collection of functors, one of which is to be invoked according to a given key. Functor map classes are an extension to the functor class hierarchy, as shown in Figure 5.
Class names are constructed from the base name RWTFunctorMap by adding 1 or 2 for the number of caller arguments and an optional R if the map returns a value. Because every functor map invocation requires a key, there is no RWTFunctorMap0.
The formal template parameters (shown in the hierarchy) include:
SR - The type of the functor map's return value
Key - The type of the functor map's key (which is the functor map's first argument)
S1 - The type of the encapsulated functor's first argument (which is the functor map's second argument)
Table 3 contains an alphabetical listing of the public classes and global functions and macros in the Functor package.
Class Name | Description |
RWFunctor0 |
The handle class for functors that are invoked without any caller arguments, and whose invocation returns no value. |
RWFunctor0Imp |
The abstract base class for functor bodies that are invoked without any caller arguments, and whose invocation returns no value. |
RWTFunctor0GA1Imp |
The body class for functors that:
|
RWTFunctor0GA2Imp |
The body class for functors that:
|
RWTFunctor0GA3Imp |
The body class for functors that:
|
RWTFunctor0GImp |
The body class for functors that:
|
RWTFunctor0MA1Imp |
The body class for functors that:
|
RWTFunctor0MA2Imp |
The body class for functors that:
|
RWTFunctor0MA3Imp |
The body class for functors that:
|
RWTFunctor0MImp |
The body class for functors that:
|
RWTFunctor1 |
The handle class for functors that are invoked with one caller argument. |
RWTFunctor1GA1Imp |
The body class for functors that:
|
RWTFunctor1GA2Imp |
The body class for functors that:
|
RWTFunctor1GImp |
The body class for functors that:
|
RWTFunctor1Imp |
The abstract base class for functor bodies that are invoked with one caller argument. |
RWTFunctor1MA1Imp |
The body class for functors that:
|
RWTFunctor1MA2Imp |
The body class for functors that:
|
RWTFunctor1MImp |
The body class for functors that:
|
RWTFunctor2 |
The handle class for functors that are invoked with two caller arguments. |
RWTFunctor2GA1Imp |
The body class for functors that:
|
RWTFunctor2GA2Imp |
The body class for functors that:
|
RWTFunctor2GImp |
The body class for functors that:
|
RWTFunctor2Imp |
The abstract base class for functor bodies that are invoked with two caller arguments. |
RWTFunctor2MA1Imp |
The body class for functors that:
|
RWTFunctor2MA2Imp |
The body class for functors that:
|
RWTFunctor2MImp |
The body class for functors that:
|
RWTFunctorR0 |
The handle class for functor bodies that are invoked with no caller arguments and return a value. |
RWTFunctorR0GA1Imp |
The body class for functors that:
|
RWTFunctorR0GA2Imp |
The body class for functors that:
|
RWTFunctorR0GA3Imp |
The body class for functors that:
|
RWTFunctorR0GImp |
The body class for functors that:
|
RWTFunctorR0Imp |
The abstract base class for functor bodies that are invoked with no caller arguments and return a value. |
RWTFunctorR0MA1Imp |
The body class for functors that:
|
RWTFunctorR0MA2Imp |
The body class for functors that:
|
RWTFunctorR0MA3Imp |
The body class for functors that:
|
RWTFunctorR0MImp |
The body class for functors that:
|
RWTFunctorR1 |
|
RWTFunctorR1GA1Imp |
The body class for functors that:
|
RWTFunctorR1GA2Imp |
The body class for functors that:
|
RWTFunctorR1GImp |
The body class for functors that:
|
RWTFunctorR1Imp |
The abstract base class for functor bodies that are invoked with one caller argument and return a value. |
RWTFunctorR1MA1Imp |
The body class for functors that:
|
RWTFunctorR1MA2Imp |
The body class for functors that:
|
RWTFunctorR1MImp |
The body class for functors that:
|
RWTFunctorR2 |
The handle class for functors that are invoked with two caller arguments and that return a value. |
RWTFunctorR2GA1Imp |
The body class for functors that:
|
RWTFunctorR2GA2Imp |
The body class for functors that:
|
RWTFunctorR2GImp |
The body class for functors that:
|
RWTFunctorR2Imp |
The abstract base class for functor bodies that are invoked with two caller arguments and return a value. |
RWTFunctorR2MA1Imp |
The body class for functors that:
|
RWTFunctorR2MA2Imp |
The body class for functors that:
|
RWTFunctorR2MImp |
The body class for functors that:
|
rwtMakeFunctor0 |
Creates an instance of RWFunctor0 from a global or member function pointer. |
rwtMakeFunctor1 |
Creates an instance of RWFunctor1<S1> from a global or member function pointer. |
rwtMakeFunctor2 |
Creates an instance of RWFunctor2<S1,S2> from a global or member function pointer. |
rwtMakeFunctorR0 |
Creates an instance of RWFunctorR0<SR> from a global or member function pointer. |
rwtMakeFunctorR1 |
Creates an instance of RWFunctorR1<SR,S1> from a global or member function pointer. |
rwtMakeFunctorR2 |
Creates an instance of RWFunctorR2<SR,S1,S2> from a global or member function pointer. |
Table 4 lists the public classes in the Functor List package.
Class Name | Description |
RWFunctorList0 |
The functor list class that is invoked with no caller arguments. |
RWTFunctorList1 |
The functor list class that is invoked with one caller argument. |
RWTFunctorList2 |
The functor list class that is invoked with two caller arguments. |
Table 5 lists the public classes in the Functor Map package.
Class Name | Description |
RWTFunctorMap1 |
The functor map class that takes one argument at invocation, and returns no value. |
RWTFunctorMap2 |
The functor map class that takes two arguments at invocation, and returns no value. |
RWTFunctorMapR1 |
The functor map class that takes one argument at invocation, and returns a value. |
RWTFunctorMapR2 |
The functor map class that takes two arguments at invocation, and returns a value. |
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.