CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ServiceWrapper.h
Go to the documentation of this file.
1 #ifndef ServiceRegistry_ServiceWrapper_h
2 #define ServiceRegistry_ServiceWrapper_h
3 // -*- C++ -*-
4 //
5 // Package: ServiceRegistry
6 // Class : ServiceWrapper
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Mon Sep 5 13:33:01 EDT 2005
19 //
20 
21 // system include files
22 #include <memory>
23 
24 // user include files
27 
28 // forward declarations
29 namespace edm {
30  class ParameterSet;
31  class ActivityRegistry;
32 
33  namespace serviceregistry {
34 
35  template< class T>
36  class ServiceWrapper : public ServiceWrapperBase
37  {
38 
39 public:
40  ServiceWrapper(std::unique_ptr<T> iService) :
41  service_(std::move(iService)) {}
42  //virtual ~ServiceWrapper();
43 
44  // ---------- const member functions ---------------------
45  T const& get() const { return *service_; }
46 
47  // ---------- static member functions --------------------
48 
49  // ---------- member functions ---------------------------
50  T& get() { return *service_; }
51 
52 private:
53  ServiceWrapper(const ServiceWrapper&); // stop default
54 
55  const ServiceWrapper& operator=(const ServiceWrapper&); // stop default
56 
57  // ---------- member data --------------------------------
59 
60  };
61  }
62 }
63 
64 #endif
const ServiceWrapper & operator=(const ServiceWrapper &)
ServiceWrapper(std::unique_ptr< T > iService)
def move
Definition: eostools.py:510
long double T
edm::propagate_const< std::unique_ptr< T > > service_