CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FlaggedPtr.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFProducer_FlaggedPtr_h
2 #define RecoParticleFlow_PFProducer_FlaggedPtr_h
3 
4 template <typename T>
5 class FlaggedPtr {
6 public:
7  FlaggedPtr(T* pointer, bool flag) : pointer_(pointer), flag_(flag) {}
8  T& operator*() const { return *pointer_; }
9  T* operator->() const { return pointer_; }
10  T* get() const { return pointer_; }
11  bool flag() const { return flag_; }
12  void setFlag(bool flag) { flag_ = flag; }
13 
14 private:
16  bool flag_;
17 };
18 
19 #endif
FlaggedPtr(T *pointer, bool flag)
Definition: FlaggedPtr.h:7
bool flag_
Definition: FlaggedPtr.h:16
void setFlag(bool flag)
Definition: FlaggedPtr.h:12
T & operator*() const
Definition: FlaggedPtr.h:8
T * operator->() const
Definition: FlaggedPtr.h:9
T * pointer_
Definition: FlaggedPtr.h:15
long double T
bool flag() const
Definition: FlaggedPtr.h:11