LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
BoolCache.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Common_BoolCache_h
2 #define canvas_Persistency_Common_BoolCache_h
3 // -*- C++ -*-
4 //
5 // Package: Common
6 // Class : BoolCache
7 //
18 //
19 // Original Author: Chris Jones
20 // Created: Sat Aug 18 17:30:08 EDT 2007
21 //
22 //
23 
24 // system include files
25 
26 // user include files
27 
28 // forward declarations
29 namespace art {
30  class BoolCache {
31  public:
32  BoolCache() : isCached_(false) {}
33  BoolCache(bool iValue) : isCached_(iValue) {}
34  operator bool() { return isCached_; }
35  // Cannot ref-qualify assignment operator because of GCC_XML.
36  BoolCache&
37  operator=(bool b)
38  {
39  isCached_ = b;
40  return *this;
41  }
42 
43  private:
44  bool isCached_;
45  };
46 }
47 #endif /* canvas_Persistency_Common_BoolCache_h */
48 
49 // Local Variables:
50 // mode: c++
51 // End:
BoolCache(bool iValue)
Definition: BoolCache.h:33
BoolCache & operator=(bool b)
Definition: BoolCache.h:37
bool isCached_
Definition: BoolCache.h:44
HLT enums.