CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DataFormats/Provenance/interface/Transient.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Provenance_Transient_h
00002 #define DataFormats_Provenance_Transient_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Provenance
00006 // Class  :     Transient
00007 // 
00017 //
00018 // Original Author:  Bill Tanenbaum
00019 //         Created:  Sat Aug 18 17:30:08 EDT 2007
00020 //
00021 
00022 // system include files
00023 
00024 // user include files
00025 
00026 // forward declarations
00027 namespace edm {
00028 
00029 template <typename T>
00030 class Transient {
00031 public:
00032   typedef T value_type;
00033   Transient() : value_(T()) {}
00034   explicit Transient(T const& value) : value_(value) {}
00035   operator T() const { return value_; }
00036   Transient & operator=(T const& rh) { value_ = rh; return *this; }
00037   T const& get() const { return value_;}
00038   T & get() { return value_;}
00039 private:
00040   T value_;
00041 };
00042 }
00043 #endif