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

rwtMakeIOUCallback()

Module:  Threads   Package:  Interthread Communication


Global Functions and Macros

Local Index

Members

Non-Members

Header File

#include <rw/itc/rwtMakeIOUCallback.h>

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