OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
functor.h File Reference

C++ Functor template implementation. More...

#include <owl/private/defs.h>
#include <ctype.h>
#include <owl/preclass.h>
#include <owl/posclass.h>

Go to the source code of this file.

Classes

class  owl::TFunctorBase
 Base functor class holds all of the actual data. More...
 
class  owl::TFunctorV0
 Functor with 0 parameters, void return. More...
 
class  owl::TFunctionTranslatorV0< Funct >
 
class  owl::TMemberTranslatorV0< TCallee, TMemFunc >
 
class  owl::TFunctor0< R >
 Functor with 0 parameters, return R. More...
 
class  owl::TFunctionTranslator0< R, Funct >
 
class  owl::TMemberTranslator0< R, TCallee, TMemFunc >
 
class  owl::TFunctorV1< P1 >
 Functor with 1 parameter, void return. More...
 
class  owl::TFunctionTranslatorV1< P1, Funct >
 
class  owl::TMemberTranslatorV1< P1, TCallee, TMemFunc >
 
class  owl::TFunctor1< R, P1 >
 Functor with 1 parameter, return R. More...
 
class  owl::TFunctionTranslator1< R, P1, Funct >
 
class  owl::TMemberTranslator1< R, P1, TCallee, TMemFunc >
 
class  owl::TFunctorV2< P1, P2 >
 Functor with 2 parameters, void return. More...
 
class  owl::TFunctionTranslatorV2< P1, P2, Funct >
 
class  owl::TMemberTranslatorV2< P1, P2, TCallee, TMemFunc >
 
class  owl::TFunctor2< R, P1, P2 >
 Functor with 2 parameters, return R. More...
 
class  owl::TFunctionTranslator2< R, P1, P2, Funct >
 
class  owl::TMemberTranslator2< R, P1, P2, TCallee, TMemFunc >
 
class  owl::TFunctorV3< P1, P2, P3 >
 Functor with 3 parameters, void return. More...
 
class  owl::TFunctionTranslatorV3< P1, P2, P3, Funct >
 
class  owl::TMemberTranslatorV3< P1, P2, P3, TCallee, TMemFunc >
 
class  owl::TFunctor3< R, P1, P2, P3 >
 Functor with 3 parameters, return R. More...
 
class  owl::TFunctionTranslator3< R, P1, P2, P3, Funct >
 
class  owl::TMemberTranslator3< R, P1, P2, P3, TCallee, TMemFunc >
 
class  owl::TFunctorV4< P1, P2, P3, P4 >
 Functor with 4 parameters, void return. More...
 
class  owl::TFunctionTranslatorV4< P1, P2, P3, P4, Funct >
 
class  owl::TMemberTranslatorV4< P1, P2, P3, P4, TCallee, TMemFunc >
 
class  owl::TFunctor4< R, P1, P2, P3, P4 >
 Functor with 4 parameters, return R. More...
 
class  owl::TFunctionTranslator4< R, P1, P2, P3, P4, Funct >
 
class  owl::TMemberTranslator4< R, P1, P2, P3, P4, TCallee, TMemFunc >
 
class  owl::TFunctorV5< P1, P2, P3, P4, P5 >
 Functor with 5 parameters, void return. More...
 
class  owl::TFunctionTranslatorV5< P1, P2, P3, P4, P5, Funct >
 
class  owl::TMemberTranslatorV5< P1, P2, P3, P4, P5, TCallee, TMemFunc >
 
class  owl::TFunctor5< R, P1, P2, P3, P4, P5 >
 Functor with 5 parameters, return R. More...
 
class  owl::TFunctionTranslator5< R, P1, P2, P3, P4, P5, Funct >
 
class  owl::TMemberTranslator5< R, P1, P2, P3, P4, P5, TCallee, TMemFunc >
 
class  owl::TFunctorV6< P1, P2, P3, P4, P5, P6 >
 Functor with 6 parameters, void return. More...
 
class  owl::TFunctionTranslatorV6< P1, P2, P3, P4, P5, P6, Funct >
 
class  owl::TMemberTranslatorV6< P1, P2, P3, P4, P5, P6, TCallee, TMemFunc >
 
class  owl::TFunctor6< R, P1, P2, P3, P4, P5, P6 >
 Functor with 6 parameters, return R. More...
 
class  owl::TFunctionTranslator6< R, P1, P2, P3, P4, P5, P6, Funct >
 
class  owl::TMemberTranslator6< R, P1, P2, P3, P4, P5, P6, TCallee, TMemFunc >
 

Namespaces

namespace  owl
 Object Windows Library (OWLNext Core)
 

Macros

#define BDTF_H
 
#define OWL_FUNCTOR_H
 
#define THUNKREF(th)   const th &
 

Functions

template<class TRT >
TFunctorV0 owl::Functor (TFunctorV0 *, TRT(*f)())
 
template<class TCallee , class TRT , class TCallType >
TFunctorV0 owl::Functor (TFunctorV0 *, TCallee &c, TRT(TCallType::*const &f)())
 
template<class TCallee , class TRT , class TCallType >
TFunctorV0 owl::Functor (TFunctorV0 *, const TCallee &c, TRT(TCallType::*const &f)() const)
 
template<class R , class TRT >
TFunctor0< Rowl::Functor (TFunctor0< R > *, TRT(*f)())
 
template<class R , class TCallee , class TRT , class TCallType >
TFunctor0< Rowl::Functor (TFunctor0< R > *, TCallee &c, TRT(TCallType::*const &f)())
 
template<class R , class TCallee , class TRT , class TCallType >
TFunctor0< Rowl::Functor (TFunctor0< R > *, const TCallee &c, TRT(TCallType::*const &f)() const)
 
template<class P1 , class TRT , class TP1 >
TFunctorV1< P1owl::Functor (TFunctorV1< P1 > *, TRT(*f)(TP1))
 
template<class P1 , class TCallee , class TRT , class TCallType , class TP1 >
TFunctorV1< P1owl::Functor (TFunctorV1< P1 > *, TCallee &c, TRT(TCallType::*const &f)(TP1))
 
template<class P1 , class TCallee , class TRT , class TCallType , class TP1 >
TFunctorV1< P1owl::Functor (TFunctorV1< P1 > *, const TCallee &c, TRT(TCallType::*const &f)(TP1) const)
 
template<class R , class P1 , class TRT , class TP1 >
TFunctor1< R, P1owl::Functor (TFunctor1< R, P1 > *, TRT(*f)(TP1))
 
template<class R , class P1 , class TCallee , class TRT , class TCallType , class TP1 >
TFunctor1< R, P1owl::Functor (TFunctor1< R, P1 > *, TCallee &c, TRT(TCallType::*const &f)(TP1))
 
template<class R , class P1 , class TCallee , class TRT , class TCallType , class TP1 >
TFunctor1< R, P1owl::Functor (TFunctor1< R, P1 > *, const TCallee &c, TRT(TCallType::*const &f)(TP1) const)
 
template<class P1 , class P2 , class TRT , class TP1 , class TP2 >
TFunctorV2< P1, P2owl::Functor (TFunctorV2< P1, P2 > *, TRT(*f)(TP1, TP2))
 
template<class P1 , class P2 , class TCallee , class TRT , class TCallType , class TP1 , class TP2 >
TFunctorV2< P1, P2owl::Functor (TFunctorV2< P1, P2 > *, TCallee &c, TRT(TCallType::*const &f)(TP1, TP2))
 
template<class P1 , class P2 , class TCallee , class TRT , class TCallType , class TP1 , class TP2 >
TFunctorV2< P1, P2owl::Functor (TFunctorV2< P1, P2 > *, const TCallee &c, TRT(TCallType::*const &f)(TP1, TP2) const)
 
template<class R , class P1 , class P2 , class TRT , class TP1 , class TP2 >
TFunctor2< R, P1, P2owl::Functor (TFunctor2< R, P1, P2 > *, TRT(*f)(TP1, TP2))
 
template<class R , class P1 , class P2 , class TCallee , class TRT , class TCallType , class TP1 , class TP2 >
TFunctor2< R, P1, P2owl::Functor (TFunctor2< R, P1, P2 > *, TCallee &c, TRT(TCallType::*const &f)(TP1, TP2))
 
template<class R , class P1 , class P2 , class TCallee , class TRT , class TCallType , class TP1 , class TP2 >
TFunctor2< R, P1, P2owl::Functor (TFunctor2< R, P1, P2 > *, const TCallee &c, TRT(TCallType::*const &f)(TP1, TP2) const)
 
template<class P1 , class P2 , class P3 , class TRT , class TP1 , class TP2 , class TP3 >
TFunctorV3< P1, P2, P3owl::Functor (TFunctorV3< P1, P2, P3 > *, TRT(*f)(TP1, TP2, TP3))
 
template<class P1 , class P2 , class P3 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 >
TFunctorV3< P1, P2, P3owl::Functor (TFunctorV3< P1, P2, P3 > *, TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3))
 
template<class P1 , class P2 , class P3 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 >
TFunctorV3< P1, P2, P3owl::Functor (TFunctorV3< P1, P2, P3 > *, const TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3) const)
 
template<class R , class P1 , class P2 , class P3 , class TRT , class TP1 , class TP2 , class TP3 >
TFunctor3< R, P1, P2, P3owl::Functor (TFunctor3< R, P1, P2, P3 > *, TRT(*f)(TP1, TP2, TP3))
 
template<class R , class P1 , class P2 , class P3 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 >
TFunctor3< R, P1, P2, P3owl::Functor (TFunctor3< R, P1, P2, P3 > *, TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3))
 
template<class R , class P1 , class P2 , class P3 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 >
TFunctor3< R, P1, P2, P3owl::Functor (TFunctor3< R, P1, P2, P3 > *, const TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3) const)
 
template<class P1 , class P2 , class P3 , class P4 , class TRT , class TP1 , class TP2 , class TP3 , class TP4 >
TFunctorV4< P1, P2, P3, P4owl::Functor (TFunctorV4< P1, P2, P3, P4 > *, TRT(*f)(TP1, TP2, TP3, TP4))
 
template<class P1 , class P2 , class P3 , class P4 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 >
TFunctorV4< P1, P2, P3, P4owl::Functor (TFunctorV4< P1, P2, P3, P4 > *, TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4))
 
template<class P1 , class P2 , class P3 , class P4 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 >
TFunctorV4< P1, P2, P3, P4owl::Functor (TFunctorV4< P1, P2, P3, P4 > *, const TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4) const)
 
template<class R , class P1 , class P2 , class P3 , class P4 , class TRT , class TP1 , class TP2 , class TP3 , class TP4 >
TFunctor4< R, P1, P2, P3, P4owl::Functor (TFunctor4< R, P1, P2, P3, P4 > *, TRT(*f)(TP1, TP2, TP3, TP4))
 
template<class R , class P1 , class P2 , class P3 , class P4 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 >
TFunctor4< R, P1, P2, P3, P4owl::Functor (TFunctor4< R, P1, P2, P3, P4 > *, TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4))
 
template<class R , class P1 , class P2 , class P3 , class P4 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 >
TFunctor4< R, P1, P2, P3, P4owl::Functor (TFunctor4< R, P1, P2, P3, P4 > *, const TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4) const)
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class TRT , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 >
TFunctorV5< P1, P2, P3, P4, P5owl::Functor (TFunctorV5< P1, P2, P3, P4, P5 > *, TRT(*f)(TP1, TP2, TP3, TP4, TP5))
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 >
TFunctorV5< P1, P2, P3, P4, P5owl::Functor (TFunctorV5< P1, P2, P3, P4, P5 > *, TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4, TP5))
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 >
TFunctorV5< P1, P2, P3, P4, P5owl::Functor (TFunctorV5< P1, P2, P3, P4, P5 > *, const TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4, TP5) const)
 
template<class R , class P1 , class P2 , class P3 , class P4 , class P5 , class TRT , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 >
TFunctor5< R, P1, P2, P3, P4, P5owl::Functor (TFunctor5< R, P1, P2, P3, P4, P5 > *, TRT(*f)(TP1, TP2, TP3, TP4, TP5))
 
template<class R , class P1 , class P2 , class P3 , class P4 , class P5 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 >
TFunctor5< R, P1, P2, P3, P4, P5owl::Functor (TFunctor5< R, P1, P2, P3, P4, P5 > *, TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4, TP5))
 
template<class R , class P1 , class P2 , class P3 , class P4 , class P5 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 >
TFunctor5< R, P1, P2, P3, P4, P5owl::Functor (TFunctor5< R, P1, P2, P3, P4, P5 > *, const TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4, TP5) const)
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class TRT , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 , class TP6 >
TFunctorV6< P1, P2, P3, P4, P5, P6owl::Functor (TFunctorV6< P1, P2, P3, P4, P5, P6 > *, TRT(*f)(TP1, TP2, TP3, TP4, TP5, TP6))
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 , class TP6 >
TFunctorV6< P1, P2, P3, P4, P5, P6owl::Functor (TFunctorV6< P1, P2, P3, P4, P5, P6 > *, TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4, TP5, TP6))
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 , class TP6 >
TFunctorV6< P1, P2, P3, P4, P5, P6owl::Functor (TFunctorV6< P1, P2, P3, P4, P5, P6 > *, const TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4, TP5, TP6) const)
 
template<class R , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class TRT , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 , class TP6 >
TFunctor6< R, P1, P2, P3, P4, P5, P6owl::Functor (TFunctor6< R, P1, P2, P3, P4, P5, P6 > *, TRT(*f)(TP1, TP2, TP3, TP4, TP5, TP6))
 
template<class R , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 , class TP6 >
TFunctor6< R, P1, P2, P3, P4, P5, P6owl::Functor (TFunctor6< R, P1, P2, P3, P4, P5, P6 > *, TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4, TP5, TP6))
 
template<class R , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class TCallee , class TRT , class CallType , class TP1 , class TP2 , class TP3 , class TP4 , class TP5 , class TP6 >
TFunctor6< R, P1, P2, P3, P4, P5, P6owl::Functor (TFunctor6< R, P1, P2, P3, P4, P5, P6 > *, const TCallee &c, TRT(CallType::*const &f)(TP1, TP2, TP3, TP4, TP5, TP6) const)
 

Detailed Description

C++ Functor template implementation.

The templates meant for actual end use are:

Void return, N arguments

Return R, N arguments

The Functor() template function is invoked to create a temporary translator to initialize the actual functor. Currently, the first argument to Functor() must be a dummy pointer to the desired TFunctor template. When templatized member functions are available, this arg will be eliminated.

Based on Functors described in Rich Hickey's 'Callbacks in C++ using template functors' Feb 95 C++ Report

Definition in file functor.h.

Macro Definition Documentation

◆ BDTF_H

#define BDTF_H

Definition at line 42 of file functor.h.

◆ OWL_FUNCTOR_H

#define OWL_FUNCTOR_H

Definition at line 43 of file functor.h.

◆ THUNKREF

#define THUNKREF ( th)    const th &

Definition at line 55 of file functor.h.