CMS 3D CMS Logo

FunctorHandleExceptionFactory.h
Go to the documentation of this file.
1 #ifndef Subsystem_Package_FunctorHandleExceptionFactory_h
2 #define Subsystem_Package_FunctorHandleExceptionFactory_h
3 // -*- C++ -*-
4 //
5 // Package: Subsystem/Package
6 // Class : FunctorHandleExceptionFactory
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Wed, 04 Dec 2013 18:41:59 GMT
19 //
20 
21 // system include files
23 
24 // user include files
25 
26 // forward declarations
27 namespace edm {
28 
29  template<typename T>
31  {
32 
33  public:
34  FunctorHandleExceptionFactory(T&& iFunctor) : m_functor(std::move(iFunctor)) {}
35 
36  //FunctorHandleExceptionFactory(T iFunctor) : m_functor(iFunctor) {}
37 
38  // ---------- const member functions ---------------------
39 
40  std::shared_ptr<cms::Exception> make() const override {
41  return m_functor();
42  }
43  private:
45  };
46 
47  template<typename T>
48  std::shared_ptr<HandleExceptionFactory> makeHandleExceptionFactory(T&& iFunctor) {
49  return std::make_shared<FunctorHandleExceptionFactory<T>>(std::move(iFunctor));
50  }
51 }
52 
53 
54 #endif
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
HLT enums.
std::shared_ptr< cms::Exception > make() const override
long double T
def move(src, dest)
Definition: eostools.py:510