DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
dd4hep::CallbackSequence Struct Reference

Definition of an actor on sequences of callbacks. More...

#include <Callback.h>

Public Types

enum  Location { FRONT, END }
 
typedef std::vector< CallbackCallbacks
 

Public Member Functions

 CallbackSequence ()
 Default constructor. More...
 
 CallbackSequence (const CallbackSequence &c)
 Copy constructor. More...
 
CallbackSequenceoperator= (const CallbackSequence &c)
 Assignment operator. More...
 
bool empty () const
 
void clear ()
 Clear the sequence and remove all callbacks. More...
 
void add (const Callback &cb, Location where)
 Generically Add a new callback to the sequence depending on the location arguments. More...
 
void add (const Callback &cb)
 Generically Add a new callback to the sequence depending on the location arguments. More...
 
void operator() () const
 Execution overload for callbacks with no arguments. More...
 
template<typename A0 >
void operator() (A0 a0) const
 Execution overload for callbacks with 1 argument. More...
 
template<typename A0 , typename A1 >
void operator() (A0 a0, A1 a1) const
 Execution overload for callbacks with 2 arguments. More...
 
template<typename A0 , typename A1 , typename A2 >
void operator() (A0 a0, A1 a1, A2 a2) const
 Execution overload for callbacks with 3 arguments. More...
 
template<typename TYPE , typename R , typename OBJECT >
void add (TYPE *pointer, R(OBJECT::*pmf)(), Location where=CallbackSequence::END)
 Add a new callback to a member function with explicit return type and no arguments. More...
 
template<typename TYPE , typename R , typename OBJECT >
void add (TYPE *pointer, R(OBJECT::*pmf)() const, Location where=CallbackSequence::END)
 Add a new callback to a const member function with explicit return type and no arguments. More...
 
template<typename TYPE , typename OBJECT >
void add (TYPE *pointer, void(OBJECT::*pmf)(), Location where=CallbackSequence::END)
 Add a new callback to a void member function with no arguments. More...
 
template<typename TYPE , typename OBJECT >
void add (TYPE *pointer, void(OBJECT::*pmf)() const, Location where=CallbackSequence::END)
 Add a new callback to a const void member function and no arguments. More...
 
template<typename TYPE , typename R , typename OBJECT , typename A >
void add (TYPE *pointer, R(OBJECT::*pmf)(A), Location where=CallbackSequence::END)
 Add a new callback to a member function with explicit return type and 1 argument. More...
 
template<typename TYPE , typename OBJECT , typename A >
void add (TYPE *pointer, void(OBJECT::*pmf)(A), Location where=CallbackSequence::END)
 Add a new callback to a void member function and 1 argument. More...
 
template<typename TYPE , typename R , typename OBJECT , typename A >
void add (TYPE *pointer, R(OBJECT::*pmf)(A) const, Location where=CallbackSequence::END)
 Add a new callback to a const member function with explicit return type and 1 argument. More...
 
template<typename TYPE , typename OBJECT , typename A >
void add (TYPE *pointer, void(OBJECT::*pmf)(A) const, Location where=CallbackSequence::END)
 Add a new callback to a const void member function and 1 argument. More...
 
template<typename TYPE , typename R , typename OBJECT , typename A1 , typename A2 >
void add (TYPE *pointer, R(OBJECT::*pmf)(A1, A2), Location where=CallbackSequence::END)
 Add a new callback to a member function with explicit return type and 2 arguments. More...
 
template<typename TYPE , typename R , typename OBJECT , typename A1 , typename A2 >
void add (TYPE *pointer, R(OBJECT::*pmf)(A1, A2) const, Location where=CallbackSequence::END)
 Add a new callback to a const member function with explicit return type and 2 arguments. More...
 
template<typename TYPE , typename OBJECT , typename A1 , typename A2 >
void add (TYPE *pointer, void(OBJECT::*pmf)(A1, A2), Location where=CallbackSequence::END)
 Add a new callback to a void member function with 2 arguments. More...
 
template<typename TYPE , typename OBJECT , typename A1 , typename A2 >
void add (TYPE *pointer, void(OBJECT::*pmf)(A1, A2) const, Location where=CallbackSequence::END)
 Add a new callback to a const void member function with 2 arguments. More...
 

Static Public Member Functions

static void checkTypes (const std::type_info &typ1, const std::type_info &typ2, void *test)
 Check the compatibility of two typed objects. The test is the result of a dynamic_cast. More...
 

Public Attributes

Callbacks callbacks
 

Detailed Description

Definition of an actor on sequences of callbacks.

A callback sequence is a set of callbacks with identical signature, so that the can be called consecutively using the same arguments.

Author
M.Frank
Date
01/03/2013
Version
0.1

Definition at line 339 of file Callback.h.

Member Typedef Documentation

◆ Callbacks

Definition at line 340 of file Callback.h.

Member Enumeration Documentation

◆ Location

Enumerator
FRONT 
END 

Definition at line 341 of file Callback.h.

Constructor & Destructor Documentation

◆ CallbackSequence() [1/2]

dd4hep::CallbackSequence::CallbackSequence ( )
inline

Default constructor.

Definition at line 344 of file Callback.h.

◆ CallbackSequence() [2/2]

dd4hep::CallbackSequence::CallbackSequence ( const CallbackSequence c)
inline

Copy constructor.

Definition at line 347 of file Callback.h.

Member Function Documentation

◆ add() [1/14]

void dd4hep::CallbackSequence::add ( const Callback cb)
inline

Generically Add a new callback to the sequence depending on the location arguments.

Definition at line 374 of file Callback.h.

◆ add() [2/14]

void dd4hep::CallbackSequence::add ( const Callback cb,
Location  where 
)
inline

Generically Add a new callback to the sequence depending on the location arguments.

Definition at line 367 of file Callback.h.

◆ add() [3/14]

template<typename TYPE , typename R , typename OBJECT >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
R(OBJECT::*)() const  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a const member function with explicit return type and no arguments.

Definition at line 397 of file Callback.h.

◆ add() [4/14]

template<typename TYPE , typename R , typename OBJECT >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
R(OBJECT::*)()  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a member function with explicit return type and no arguments.

Callback setup for callbacks with no arguments

Definition at line 391 of file Callback.h.

◆ add() [5/14]

template<typename TYPE , typename R , typename OBJECT , typename A >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
R(OBJECT::*)(A) const  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a const member function with explicit return type and 1 argument.

Definition at line 429 of file Callback.h.

◆ add() [6/14]

template<typename TYPE , typename R , typename OBJECT , typename A >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
R(OBJECT::*)(A)  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a member function with explicit return type and 1 argument.

Callback setup for callbacks with 1 argument

Definition at line 417 of file Callback.h.

◆ add() [7/14]

template<typename TYPE , typename R , typename OBJECT , typename A1 , typename A2 >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
R(OBJECT::*)(A1, A2) const  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a const member function with explicit return type and 2 arguments.

Definition at line 450 of file Callback.h.

◆ add() [8/14]

template<typename TYPE , typename R , typename OBJECT , typename A1 , typename A2 >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
R(OBJECT::*)(A1, A2)  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a member function with explicit return type and 2 arguments.

Callback setup for callbacks with 2 arguments

Definition at line 444 of file Callback.h.

◆ add() [9/14]

template<typename TYPE , typename OBJECT >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
void(OBJECT::*)() const  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a const void member function and no arguments.

Definition at line 409 of file Callback.h.

◆ add() [10/14]

template<typename TYPE , typename OBJECT >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
void(OBJECT::*)()  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a void member function with no arguments.

Definition at line 403 of file Callback.h.

◆ add() [11/14]

template<typename TYPE , typename OBJECT , typename A >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
void(OBJECT::*)(A) const  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a const void member function and 1 argument.

Definition at line 435 of file Callback.h.

◆ add() [12/14]

template<typename TYPE , typename OBJECT , typename A >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
void(OBJECT::*)(A)  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a void member function and 1 argument.

Definition at line 423 of file Callback.h.

◆ add() [13/14]

template<typename TYPE , typename OBJECT , typename A1 , typename A2 >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
void(OBJECT::*)(A1, A2) const  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a const void member function with 2 arguments.

Definition at line 462 of file Callback.h.

◆ add() [14/14]

template<typename TYPE , typename OBJECT , typename A1 , typename A2 >
void dd4hep::CallbackSequence::add ( TYPE *  pointer,
void(OBJECT::*)(A1, A2)  pmf,
Location  where = CallbackSequence::END 
)
inline

Add a new callback to a void member function with 2 arguments.

Definition at line 456 of file Callback.h.

◆ checkTypes()

void dd4hep::CallbackSequence::checkTypes ( const std::type_info &  typ1,
const std::type_info &  typ2,
void *  test 
)
static

Check the compatibility of two typed objects. The test is the result of a dynamic_cast.

Definition at line 19 of file Callback.cpp.

◆ clear()

void dd4hep::CallbackSequence::clear ( )
inline

Clear the sequence and remove all callbacks.

Definition at line 363 of file Callback.h.

◆ empty()

bool dd4hep::CallbackSequence::empty ( ) const
inline

Definition at line 359 of file Callback.h.

◆ operator()() [1/4]

void dd4hep::CallbackSequence::operator() ( ) const
inline

Execution overload for callbacks with no arguments.

Definition at line 469 of file Callback.h.

◆ operator()() [2/4]

template<typename A0 >
void dd4hep::CallbackSequence::operator() ( A0  a0) const
inline

Execution overload for callbacks with 1 argument.

Definition at line 478 of file Callback.h.

◆ operator()() [3/4]

template<typename A0 , typename A1 >
void dd4hep::CallbackSequence::operator() ( A0  a0,
A1  a1 
) const
inline

Execution overload for callbacks with 2 arguments.

Definition at line 487 of file Callback.h.

◆ operator()() [4/4]

template<typename A0 , typename A1 , typename A2 >
void dd4hep::CallbackSequence::operator() ( A0  a0,
A1  a1,
A2  a2 
) const
inline

Execution overload for callbacks with 3 arguments.

Definition at line 496 of file Callback.h.

◆ operator=()

CallbackSequence& dd4hep::CallbackSequence::operator= ( const CallbackSequence c)
inline

Assignment operator.

Definition at line 351 of file Callback.h.

Member Data Documentation

◆ callbacks

Callbacks dd4hep::CallbackSequence::callbacks

Definition at line 342 of file Callback.h.


The documentation for this struct was generated from the following files: