CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FWCore/Framework/interface/ProxyFactoryTemplate.h

Go to the documentation of this file.
00001 #ifndef Framework_ProxyFactoryTemplate_h
00002 #define Framework_ProxyFactoryTemplate_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Framework
00006 // Class  :     ProxyFactoryTemplate
00007 // 
00016 //
00017 // Author:      Chris Jones
00018 // Created:     Fri Apr  8 07:59:32 CDT 2005
00019 //
00020 
00021 // system include files
00022 #include <memory>
00023 #include <string>
00024 
00025 // user include files
00026 #include "FWCore/Framework/interface/ProxyFactoryBase.h"
00027 #include "FWCore/Framework/interface/DataKey.h"
00028 
00029 // forward declarations
00030 namespace edm {
00031    namespace eventsetup {
00032 
00033 template <class T>
00034 class ProxyFactoryTemplate : public ProxyFactoryBase
00035 {
00036 
00037    public:
00038       typedef typename T::record_type record_type;
00039    
00040       ProxyFactoryTemplate() {}
00041       //virtual ~ProxyFactoryTemplate();
00042 
00043       // ---------- const member functions ---------------------
00044       virtual std::auto_ptr<DataProxy> makeProxy() const {
00045          return std::auto_ptr<DataProxy>(new T);
00046       }
00047       
00048       
00049       virtual DataKey makeKey(const std::string& iName) const {
00050          return DataKey(DataKey::makeTypeTag< typename T::value_type>(),iName.c_str());
00051       }
00052       
00053       // ---------- static member functions --------------------
00054 
00055       // ---------- member functions ---------------------------
00056 
00057    private:
00058       ProxyFactoryTemplate(const ProxyFactoryTemplate&); // stop default
00059 
00060       const ProxyFactoryTemplate& operator=(const ProxyFactoryTemplate&); // stop default
00061 
00062       // ---------- member data --------------------------------
00063 
00064 };
00065 
00066    }
00067 }
00068 
00069 #endif