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  public:
32  FunctorHandleExceptionFactory(T&& iFunctor) : m_functor(std::move(iFunctor)) {}
33 
34  //FunctorHandleExceptionFactory(T iFunctor) : m_functor(iFunctor) {}
35 
36  // ---------- const member functions ---------------------
37 
38  std::shared_ptr<cms::Exception> make() const override { return m_functor(); }
39 
40  private:
42  };
43 
44  template <typename T>
45  std::shared_ptr<HandleExceptionFactory> makeHandleExceptionFactory(T&& iFunctor) {
46  return std::make_shared<FunctorHandleExceptionFactory<T>>(std::move(iFunctor));
47  }
48 } // namespace edm
49 
50 #endif
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
std::shared_ptr< cms::Exception > make() const override
HLT enums.
long double T
def move(src, dest)
Definition: eostools.py:511