CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  public:
32  MakeModuleHelper() = delete;
33  MakeModuleHelper(const MakeModuleHelper&) = delete; // stop default
34 
35  const MakeModuleHelper& operator=(const MakeModuleHelper&) = delete; // stop default
36 
37  template <typename T>
38  static std::unique_ptr<Base> makeModule(ParameterSet const& pset) {
39  auto module = std::make_unique<T>(pset);
40  return std::unique_ptr<Base>(module.release());
41  }
42  };
43 } // namespace edm
44 
45 #endif
const MakeModuleHelper & operator=(const MakeModuleHelper &)=delete
static std::unique_ptr< Base > makeModule(ParameterSet const &pset)
tuple module
Definition: callgraph.py:69