CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
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< cms::Exception > make() const
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
def move
Definition: eostools.py:510
long double T