-
template
class
ApplicableBinder0<class T, typename R>
: Applicable
-
Call a simple (generator) member function via the Applicable interface.
This is an adapter template for parameter-less member functions to the Applicable
interface. Besides this adapter for parameter-less member functions, there exist
adapters for member functions with 1 to 4 parameters, namely ApplicableBinder1 to ApplicableBinder4.
For each adapter to Applicable exists a template function
that could be used to instantiate the template on the fly.
template<class T, typename R> inline Applicable<T>* apply (R (T::*meth)());
template<class T, typename R, typename A1>
inline Applicable<T>* apply (R (T::*meth)(A1), A1 arg1);
template<class T, typename R, typename A1, typename A2>
inline Applicable<T>* apply (R (T::*meth)(A1,A2), A1 arg1, A2 arg2);
template<class T, typename R, typename A1, typename A2, typename A3>
inline Applicable<T>* apply (R (T::*meth)(A1,A2,A3), A1 arg1, A2 arg2, A3 arg3);
template<class T, typename R, typename A1, typename A2, typename A3, typename A4>
inline Applicable<T>* apply (R (T::*meth)(A1,A2,A3,A4), A1 arg1, A2 arg2, A3 arg3, A4 arg4);
Public Members:
-
ApplicableBinder0 (mem_func_type func) ;
-
Create an adapter for a member function.
This constructor takes a member function of class T (that returns type R)
as parameter and constructs an Applicable object that could be
used in a TestGadjet or in a TestAppliance instance as set-up, tear-down or test action.
-
ApplicableBinder0 (const ApplicableBinder0& tmpl) ;
-
Copy constructor.
Creates a copy with the same member function.
-
virtual void operator() (T* instance) ;
-
Apply the applicable to the target object.
Now, the member function is applied to an instance of
class T, which is the parameter value.
The Scrunitizer C++ Unit Test Framework
by Bernd Linowski
[Scrunitizer]
[Overview]
[Cookbook]
[Download]
[Index]
[Linosphere]
Page generated: 1 Nov 2000
(C) by Bernd Linowski
scrunitizer@linosphere.de
|