00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00016
00017 #ifndef CANDREFCOUNTED_H
00018 #define CANDREFCOUNTED_H
00019
00020
00021 #ifndef ROOT_Rtypes
00022 #if !defined(__CINT__) || defined(__MAKECINT__)
00023 #include "Rtypes.h"
00024 #endif
00025 #endif
00026
00027 class CandBase;
00028
00029 class CandRefCounted
00030 {
00031
00032 public:
00033
00034
00035 virtual CandBase *Dup() const = 0;
00036
00037 protected:
00038
00039
00040 CandRefCounted();
00041
00042
00043 virtual ~CandRefCounted();
00044
00045
00046 Int_t AddLink() {return ++fNLinks;}
00047 Int_t DropLink() {return --fNLinks;}
00048
00049
00050 Int_t GetNLinks() const {return fNLinks;}
00051
00052 private:
00053 Int_t fNLinks;
00054
00055 ClassDef(CandRefCounted,2)
00056
00057 };
00058
00059 #endif // CANDREFCOUNTED_H