////////////////////////////////////////////////////////////////////////
// $Id: CandRefCounted.cxx,v 1.2 2003/03/13 23:54:10 gmieg Exp $
//
// CandRefCounted.cxx
//
// The CandBase class inherits from CandRefCounted for ref-counting.
//
// Each concrete CandBase must define a Dup function.
// Each concrete CandBase must grant friendship to class CandRefer.
//
// Adapted from Babar's BbrRefCounted (written by Gautier Hamel de
// Monchenault and Bob Jacobsen).
//
// Author:  G. Irwin 1/2000
////////////////////////////////////////////////////////////////////////

#include "Candidate/CandRefCounted.h"

#include "TBuffer.h"
#include "TClass.h"

ClassImp(CandRefCounted)

//______________________________________________________________________
CandRefCounted::CandRefCounted() :
  fNLinks(0)
{
}

//______________________________________________________________________
CandRefCounted::~CandRefCounted()
{
}

//______________________________________________________________________
void CandRefCounted::Streamer(TBuffer &R__b)
{

// Stream an object of class CandRefCounted.
   if (R__b.IsReading()) {
      CandRefCounted::Class()->ReadBuffer(R__b, this);
      fNLinks = 0; // Ref count incremented from CandRefer Streamer:2/03
   } else {
      CandRefCounted::Class()->WriteBuffer(R__b, this);
   }
}
