Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

UgliRefCnt.h

Go to the documentation of this file.
00001 
00002 // $Id: UgliRefCnt.h,v 1.4 2002/11/15 18:28:33 rhatcher Exp $
00003 //
00004 // UgliRefCnt
00005 //
00006 // Small mix-in class for reference counting
00007 //
00008 // Author:  R. Hatcher 2000.07.06
00009 //
00011 
00012 #ifndef UGLIREFCNT_H
00013 #define UGLIREFCNT_H
00014 
00015 // not inheriting from TObject so we need an explicit Rtypes
00016 #ifndef ROOT_Rtypes
00017 #if !defined(__CINT__) || defined(__MAKECINT__)
00018 #include "Rtypes.h"
00019 #endif
00020 #endif
00021 
00022 class UgliRefCnt {
00023 
00024  public:
00025 
00026    virtual void          IncrementRef();
00027    virtual void          DecrementRef();
00028    inline Int_t          CountRef() const { return fRef; }
00029 
00030  protected:
00031 
00032    UgliRefCnt() {fRef=0;}
00033    virtual ~UgliRefCnt() {;}
00034 
00035    Int_t       fRef;           // outstanding handles
00036 
00037  private:
00038 
00039    ClassDef(UgliRefCnt,1)
00040 };
00041 
00042 inline void  UgliRefCnt::IncrementRef() { fRef++; }
00043 inline void  UgliRefCnt::DecrementRef() { fRef--; }
00044 
00045 #endif // UGLIREFCNT_H

Generated on Mon Nov 23 05:28:45 2009 for loon by  doxygen 1.3.9.1