Tuples.h
Go to the documentation of this file.
1 #ifndef GAUDIALG_TUPLES_H
2 #define GAUDIALG_TUPLES_H 1
3 // ============================================================================
4 // GaudiAlg
5 // ============================================================================
6 #include "GaudiAlg/TupleObj.h"
7 // ============================================================================
8 
16 namespace Tuples
17 {
18  class Tuple ;
19  class TupleObj ;
20 } // end of namespace Tuples
21 
22 
23 namespace Tuples
24 {
33  class _TupAdapter : public std::unary_function<ARGUMENT,RESULT>
34  {
35  public:
36  // default constructor is disabled
37  _TupAdapter() = delete;
38  // constructor
39  _TupAdapter ( OBJECT object ) : m_object ( object ) {} ;
40 
42  inline RESULT operator() ( ARGUMENT arg ) const
43  { return m_object( arg ) ; }
44 
45  private:
47  };
48 
77  template <class OBJECT>
78  inline _TupAdapter<OBJECT,double> useFun ( OBJECT object )
79  { return { object } ; }
80 
81 } // end of namespace Tuples
82 
83 #endif // GAUDIALG_TUPLES_H
_TupAdapter< OBJECT, double > useFun(OBJECT object)
trivial helper function to convert on flight pointer to function into "functor" It is especially usef...
Definition: Tuples.h:78
RESULT operator()(ARGUMENT arg) const
the only one essential menthod
Definition: Tuples.h:42
OBJECT m_object
Definition: Tuples.h:46
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
string type
Definition: gaudirun.py:151
General namespace for Tuple properties.
Definition: Maps.h:34