LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
Transient.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_Transient_h
2 #define canvas_Persistency_Provenance_Transient_h
3 
13 // forward declarations
14 namespace art {
15 
16  template <typename T>
17  class Transient {
18  public:
19  typedef T value_type;
20  Transient(T value = T()) : value_(value) {}
21  operator T() const { return value_; }
22  Transient&
23  operator=(T rh)
24  {
25  value_ = rh;
26  return *this;
27  }
28  T const&
29  get() const
30  {
31  return value_;
32  }
33  T&
34  get()
35  {
36  return value_;
37  }
38 
39  private:
40  T value_;
41  };
42 }
43 #endif /* canvas_Persistency_Provenance_Transient_h */
44 
45 // Local Variables:
46 // mode: c++
47 // End:
Transient(T value=T())
Definition: Transient.h:20
Transient & operator=(T rh)
Definition: Transient.h:23
std::string value(boost::any const &)
HLT enums.