Logo ROOT  
Reference Guide
RooRefCountList.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooRefCountList.h,v 1.7 2007/05/11 09:11:30 verkerke Exp $
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 #ifndef ROO_REF_COUNT_LIST
17 #define ROO_REF_COUNT_LIST
18 
19 #include "RooLinkedList.h"
20 
22 public:
23  RooRefCountList() ;
24  virtual ~RooRefCountList() {} ;
25 
26  virtual void Add(TObject* arg) { Add(arg,1) ; }
27  virtual void Add(TObject* obj, Int_t count) ;
28  virtual Bool_t Remove(TObject* obj) ;
29  virtual Bool_t RemoveAll(TObject* obj) ;
30  Int_t refCount(TObject* obj) const;
31 
32 protected:
33  ClassDef(RooRefCountList,1) // RooLinkedList with reference counting
34 };
35 
36 #endif
RooRefCountList::Add
virtual void Add(TObject *arg)
Definition: RooRefCountList.h:40
RooRefCountList::~RooRefCountList
virtual ~RooRefCountList()
Definition: RooRefCountList.h:38
RooRefCountList::Remove
virtual Bool_t Remove(TObject *obj)
Remove object from list and if reference count reaches zero delete object itself as well.
Definition: RooRefCountList.cxx:80
bool
RooLinkedList
Definition: RooLinkedList.h:35
RooRefCountList::RooRefCountList
RooRefCountList()
Default constructor construct lists with initial hash table size of 17.
Definition: RooRefCountList.cxx:45
RooLinkedList.h
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooRefCountList::RemoveAll
virtual Bool_t RemoveAll(TObject *obj)
Remove object from list and delete object itself regardless of reference count.
Definition: RooRefCountList.cxx:101
RooRefCountList::refCount
Int_t refCount(TObject *obj) const
Return reference count associated with 'obj'.
Definition: RooRefCountList.cxx:111
int
RooRefCountList
Definition: RooRefCountList.h:21