CMS 3D CMS Logo

MakeModuleHelper.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_MakeModuleHelper_h
2 #define FWCore_Framework_MakeModuleHelper_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : MakeModuleHelper
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Sun, 25 Aug 2013 20:54:45 GMT
19 //
20 
21 // system include files
22 #include <memory>
23 // user include files
24 
25 // forward declarations
26 namespace edm {
27  class ParameterSet;
28 
29  template<typename Base>
31  {
32 
33  public:
34  MakeModuleHelper() = delete;
35  MakeModuleHelper(const MakeModuleHelper&) = delete; // stop default
36 
37  const MakeModuleHelper& operator=(const MakeModuleHelper&) = delete; // stop default
38 
39  template<typename T>
40  static std::unique_ptr<Base> makeModule(ParameterSet const& pset) {
41  auto module = std::make_unique<T>(pset);
42  return std::unique_ptr<Base>(module.release());
43  }
44  };
45 }
46 
47 
48 #endif
const MakeModuleHelper & operator=(const MakeModuleHelper &)=delete
static std::unique_ptr< Base > makeModule(ParameterSet const &pset)
HLT enums.
Definition: vlib.h:208