CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CPCSentry.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_CPCSentry_h
2 #define FWCore_Framework_CPCSentry_h
3 
4 // class CPCSentry uses RAII to make sure that the
5 // CurrentProcessingContext pointer it is guarding is set to the right
6 // value, and cleared at the right time.
7 
8 namespace edm
9 {
10  class CurrentProcessingContext;
11  namespace detail
12  {
13 
14  class CPCSentry
15  {
16  public:
19  referenced_(&c)
20  {
21  c = value;
22  }
23 
24  ~CPCSentry() { *referenced_ = 0; }
25 
26  private:
28  };
29  }
30 }
31 
32 
33 #endif // FWCore_Framework_CPCSentry_h
CPCSentry(CurrentProcessingContext const *&c, CurrentProcessingContext const *value)
Definition: CPCSentry.h:17
CurrentProcessingContext const ** referenced_
Definition: CPCSentry.h:27