Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

rwtMakeIOUCallback


Global Functions and Macros

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Member Functions

Package

Interthread Communication

Header File
& Synopsis

#include <rw/itc/rwtMakeIOUCallback.h>

void cbFunc(RWTIOUResult<int> r);
RWTIOUResult<int> res = ...;
res.addCallback(rwtMakeIOUCallback(cbFunc));

Description

The rwtMakeIOUCallback() helper functions and macros create functors that may be passed to the addCallback() method of an RWTIOUResult<R>. The functor may be created from functions that accept a first argument that is compatible with an RWTIOUResult<R>.

rwtMakeIOUCallback comes in two flavors. First, there is a set of overloaded global function templates. Since not all compilers are able to handle templates to the degree required by these functions, we also provide a corresponding set of macros. The template functions are slightly easier to use and you only have to remember one name. The macros are more portable but they do require more arguments; and because we cannot overload macros, each must have a unique name.

Example Using Templates

Example Using Macros

Global Function Templates

template <class Redeemable>
inline
RWTFunctor1< RWEscrowHandle<Redeemable> >
rwtMakeIOUCallback(void (*function)(RWTIOUResult<Redeemable>))
template <class Redeemable, class Callee>
inline
RWTFunctor1< RWEscrowHandle<Redeemable> >
rwtMakeIOUCallback(Callee& callee,
         void (Callee::*function)(RWTIOUResult<Redeemable>))
template<class Redeemable, class A1>
inline
RWTFunctor1< RWEscrowHandle<Redeemable> >
rwtMakeIOUCallback(void (*function)(RWTIOUResult<Redeemable>, A1),
                  A1 a1)
template <class Redeemable, class Callee, class A1>
inline
RWTFunctor1< RWEscrowHandle<Redeemable> >
rwtMakeIOUCallback(Callee& callee,
       void (Callee::*function)(RWTIOUResult<Redeemable>, A1),
             A1 a1)
template<class Redeemable, class A1, class A2>
inline
RWTFunctor1< RWEscrowHandle<Redeemable> >
rwtMakeIOUCallback(void (*function)(RWTIOUResult<Redeemable>,A1,A2),
                 A1 a1,
                 A2 a2)
template <class Redeemable, class Callee, class A1, class A2>
inline
RWTFunctor1< RWEscrowHandle<Redeemable> >
rwtMakeIOUCallback(Callee& callee,
void (Callee::*function)(RWTIOUResult<Redeemable>,A1,A2), A1 a1, A2 a2)

Macros
(for Use With
Global Functions)

The macros in this section use the following naming conventions for the macro arguments:

rwtMakeIOUCallbackG(function, Redeemable)
rwtMakeIOUCallbackGA1(function, Redeemable, A1, a1);
rwtMakeIOUCallbackGA2(function, Redeemable, A1, a1, A2, a2)

Macros (for Use With Member Functions)

The macros in this section use the following naming conventions for the macro arguments:

rwtMakeIOUCallbackM(Callee,callee,function,Redeemable);
rwtMakeIOUCallbackMA1(Callee,callee,function,Redeemable,
                     A1,a1);
rwtMakeIOUCallbackMA2(Callee,callee,function,Redeemable,
                     A1,a1,A2,a2);

See Also

RWTIOUResult<Redeemable>, RWTFunctor1



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.