![]() |
![]() |
DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep
Rev:Unversioneddirectory
|
Definition of the generic callback structure for member functions. More...
#include <Callback.h>
Classes | |
struct | mfunc_t |
Structure definition to store callback related data. More... | |
class | Wrapper |
Wrapper around a C++ member function pointer. More... | |
Public Types | |
typedef unsigned long(* | func_t )(void *obj, const void *fun, const void *args[]) |
typedef unsigned long | ulong |
Public Member Functions | |
Callback () | |
Default constructor. More... | |
Callback (void *p) | |
Constructor with object initialization. More... | |
Callback (void *p, void *mf, func_t c) | |
Initializing constructor. More... | |
operator bool () const | |
Check validity of the callback object. More... | |
unsigned long | execute (const void *user_param[]) const |
Execute the callback with the required number of user parameters. More... | |
template<typename T > | |
const Callback & | _make (ulong(*fptr)(void *o, const void *f, const void *u[]), T pmf) |
Callback setup function for Callbacks with member functions taking no arguments. More... | |
template<typename R , typename T > | |
const Callback & | make (R(T::*pmf)()) |
Callback setup function for Callbacks with member functions with explicit return type taking no arguments. More... | |
template<typename R , typename T > | |
const Callback & | make (R(T::*pmf)() const) |
Callback setup function for Callbacks with const member functions with explicit return type taking no arguments. More... | |
template<typename T > | |
const Callback & | make (void(T::*pmf)()) |
Callback setup function for Callbacks with void member functions taking no arguments. More... | |
template<typename T > | |
const Callback & | make (void(T::*pmf)() const) |
Callback setup function for Callbacks with const void member functions taking no arguments. More... | |
template<typename R , typename T , typename A > | |
const Callback & | make (R(T::*pmf)(A)) |
Callback setup function for Callbacks with member functions with explicit return type taking 1 argument. More... | |
template<typename R , typename T , typename A > | |
const Callback & | make (R(T::*pmf)(A) const) |
Callback setup function for Callbacks with const member functions with explicit return type taking 1 argument. More... | |
template<typename T , typename A > | |
const Callback & | make (void(T::*pmf)(A)) |
Callback setup function for Callbacks with void member functions taking 1 argument. More... | |
template<typename T , typename A > | |
const Callback & | make (void(T::*pmf)(A) const) |
Callback setup function for Callbacks with const void member functions taking 1 argument. More... | |
template<typename R , typename T , typename A0 , typename A1 > | |
const Callback & | make (R(T::*pmf)(A0, A1)) |
Callback setup function for Callbacks with member functions with explicit return type taking 2 arguments. More... | |
template<typename R , typename T , typename A0 , typename A1 > | |
const Callback & | make (R(T::*pmf)(A0, A1) const) |
Callback setup function for Callbacks with const member functions with explicit return type taking 2 arguments. More... | |
template<typename T , typename A0 , typename A1 > | |
const Callback & | make (void(T::*pmf)(A0, A1)) |
Callback setup function for Callbacks with const void member functions taking 2 arguments. More... | |
template<typename T , typename A0 , typename A1 > | |
const Callback & | make (void(T::*pmf)(A0, A1) const) |
Callback setup function for Callbacks with const void member functions taking 2 arguments. More... | |
template<typename R , typename T , typename A0 , typename A1 , typename A2 > | |
const Callback & | make (R(T::*pmf)(A0, A1, A2)) |
Callback setup function for Callbacks with member functions with explicit return type taking 3 arguments. More... | |
template<typename R , typename T , typename A0 , typename A1 , typename A2 > | |
const Callback & | make (R(T::*pmf)(A0, A1, A2) const) |
Callback setup function for Callbacks with const member functions with explicit return type taking 3 arguments. More... | |
template<typename T , typename A0 , typename A1 , typename A2 > | |
const Callback & | make (void(T::*pmf)(A0, A1, A2)) |
Callback setup function for Callbacks with const void member functions taking 3 arguments. More... | |
template<typename T , typename A0 , typename A1 , typename A2 > | |
const Callback & | make (void(T::*pmf)(A0, A1, A2) const) |
Callback setup function for Callbacks with const void member functions taking 3 arguments. More... | |
Static Public Member Functions | |
template<typename T > | |
static T * | cast (void *p) |
Template cast function used internally by the wrapper for type conversion to the object's type. More... | |
template<typename T > | |
static const T * | c_cast (const void *p) |
Template const cast function used internally by the wrapper for type conversion to the object's type. More... | |
template<typename T > | |
static Callback | make (void *p, T pmf) |
template<typename P , typename R , typename T > | |
static T * | dyn_cast (P *p, R(T::*)()) |
template<typename P , typename R , typename T > | |
static const T * | dyn_cast (const P *p, R(T::*)() const) |
template<typename P , typename R , typename T , typename A > | |
static T * | dyn_cast (P *p, R(T::*)(A)) |
template<typename P , typename R , typename T , typename A > | |
static const T * | dyn_cast (const P *p, R(T::*)(A) const) |
Public Attributes | |
void * | par |
func_t | call |
mfunc_t | func |
Definition of the generic callback structure for member functions.
The callback structure allows to wrap any member function with up to 3 arguments into an abstract objects, which could later be called using the argument list. The pointer to the hosting objects is stored in the callback object. The callback objects in this sense behaves very similar to a static function.
Definition at line 38 of file Callback.h.
typedef unsigned long(* DD4hep::Callback::func_t)(void *obj, const void *fun, const void *args[]) |
Definition at line 40 of file Callback.h.
typedef unsigned long DD4hep::Callback::ulong |
Definition at line 45 of file Callback.h.
|
inline |
Default constructor.
Definition at line 52 of file Callback.h.
References DD4hep::Callback::mfunc_t::first, func, and DD4hep::Callback::mfunc_t::second.
Referenced by make().
|
inline |
Constructor with object initialization.
Definition at line 57 of file Callback.h.
References DD4hep::Callback::mfunc_t::first, func, and DD4hep::Callback::mfunc_t::second.
|
inline |
|
inline |
Callback setup function for Callbacks with member functions taking no arguments.
Callback setup with no arguments
Definition at line 114 of file Callback.h.
Referenced by make().
|
inlinestatic |
Template const cast function used internally by the wrapper for type conversion to the object's type.
Definition at line 79 of file Callback.h.
|
inlinestatic |
Template cast function used internally by the wrapper for type conversion to the object's type.
Definition at line 75 of file Callback.h.
|
inlinestatic |
Definition at line 309 of file Callback.h.
|
inlinestatic |
Definition at line 312 of file Callback.h.
|
inlinestatic |
Definition at line 316 of file Callback.h.
|
inlinestatic |
Definition at line 319 of file Callback.h.
|
inline |
Execute the callback with the required number of user parameters.
Definition at line 71 of file Callback.h.
|
inline |
Callback setup function for Callbacks with member functions with explicit return type taking no arguments.
Definition at line 121 of file Callback.h.
References _make(), call, and DD4hep::Callback::Wrapper< T >::Functor::pmf.
Referenced by DD4hep::Simulation::Geant4PhaseAction::callback(), and DD4hep::Simulation::Geant4ActionPhase::remove().
|
inline |
Callback setup function for Callbacks with const member functions with explicit return type taking no arguments.
Definition at line 131 of file Callback.h.
References _make(), call, and DD4hep::Callback::Wrapper< T >::Functor::pmf.
|
inline |
Callback setup function for Callbacks with void member functions taking no arguments.
Definition at line 141 of file Callback.h.
References _make(), call, and DD4hep::Callback::Wrapper< T >::Functor::pmf.
|
inline |
Callback setup function for Callbacks with const void member functions taking no arguments.
Definition at line 152 of file Callback.h.
References _make(), call, and DD4hep::Callback::Wrapper< T >::Functor::pmf.
|
inline |
Callback setup function for Callbacks with member functions with explicit return type taking 1 argument.
Callbacks with 1 argument
Definition at line 165 of file Callback.h.
|
inline |
Callback setup function for Callbacks with const member functions with explicit return type taking 1 argument.
Definition at line 175 of file Callback.h.
References _make(), call, and DD4hep::Callback::Wrapper< T >::Functor::pmf.
|
inline |
Callback setup function for Callbacks with void member functions taking 1 argument.
Definition at line 185 of file Callback.h.
References _make(), call, and DD4hep::Callback::Wrapper< T >::Functor::pmf.
|
inline |
Callback setup function for Callbacks with const void member functions taking 1 argument.
Definition at line 196 of file Callback.h.
References _make(), call, and DD4hep::Callback::Wrapper< T >::Functor::pmf.
|
inline |
Callback setup function for Callbacks with member functions with explicit return type taking 2 arguments.
Callback with 2 arguments
Definition at line 210 of file Callback.h.
|
inline |
Callback setup function for Callbacks with const member functions with explicit return type taking 2 arguments.
Definition at line 221 of file Callback.h.
|
inline |
Callback setup function for Callbacks with const void member functions taking 2 arguments.
Definition at line 232 of file Callback.h.
|
inline |
Callback setup function for Callbacks with const void member functions taking 2 arguments.
Definition at line 244 of file Callback.h.
|
inline |
Callback setup function for Callbacks with member functions with explicit return type taking 3 arguments.
Callback setup for callbacks with 3 arguments
Definition at line 259 of file Callback.h.
|
inline |
Callback setup function for Callbacks with const member functions with explicit return type taking 3 arguments.
Definition at line 270 of file Callback.h.
|
inline |
Callback setup function for Callbacks with const void member functions taking 3 arguments.
Definition at line 281 of file Callback.h.
|
inline |
Callback setup function for Callbacks with const void member functions taking 3 arguments.
Definition at line 293 of file Callback.h.
Definition at line 305 of file Callback.h.
References Callback().
|
inline |
Check validity of the callback object.
Definition at line 67 of file Callback.h.
References call, DD4hep::Callback::mfunc_t::first, func, and par.
func_t DD4hep::Callback::call |
Definition at line 48 of file Callback.h.
Referenced by execute(), make(), and operator bool().
mfunc_t DD4hep::Callback::func |
Definition at line 49 of file Callback.h.
Referenced by Callback(), execute(), operator bool(), DD4hep::Callback::Wrapper< T >::pmf(), and DD4hep::Simulation::Geant4ActionPhase::remove().
void* DD4hep::Callback::par |
Definition at line 47 of file Callback.h.
Referenced by execute(), operator bool(), and DD4hep::Simulation::Geant4ActionPhase::remove().