test
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
26 
27 // forward declarations
28 namespace edm {
29  class ParameterSet;
30  class ActivityRegistry;
31 
32  namespace serviceregistry {
33 
34  template< class T>
35  class ServiceWrapper : public ServiceWrapperBase
36  {
37 
38 public:
39  ServiceWrapper(std::auto_ptr<T> iService) :
40  service_(iService) {}
41  //virtual ~ServiceWrapper();
42 
43  // ---------- const member functions ---------------------
44  T& get() const { return *service_; }
45 
46  // ---------- static member functions --------------------
47 
48  // ---------- member functions ---------------------------
49 
50 private:
51  ServiceWrapper(const ServiceWrapper&); // stop default
52 
53  const ServiceWrapper& operator=(const ServiceWrapper&); // stop default
54 
55  // ---------- member data --------------------------------
56  std::auto_ptr<T> service_;
57 
58  };
59  }
60 }
61 
62 #endif
const ServiceWrapper & operator=(const ServiceWrapper &)
ServiceWrapper(std::auto_ptr< T > iService)
long double T