CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

RCBase.cc

Go to the documentation of this file.
00001 #include "CLHEP/GenericFunctions/RCBase.hh"
00002 namespace Genfun {
00003 RCBase::RCBase()
00004       : _count(0)
00005 {
00006 }
00007 
00008 
00009 RCBase::~RCBase()
00010 {
00011 }
00012 
00013 
00014 
00015 void RCBase::ref() const
00016 {
00017   _count++;
00018 }
00019 
00020 void RCBase::unref() const
00021 {
00022   if (!_count)
00023     {
00024 
00025     }
00026   else
00027     {
00028       _count--;
00029       if (!_count)
00030         delete this;
00031     }
00032 }
00033 
00034 unsigned int RCBase::refCount() const
00035 {
00036   return _count;
00037 }
00038 
00039 } // namespace Genfun

Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7