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

LeaClassMonitor.h

Go to the documentation of this file.
00001 // $Id: LeaClassMonitor.h,v 1.3 2001/12/03 00:42:27 messier Exp $
00002 
00003 #ifndef LEACLASSMONITOR_H
00004 #define LEACLASSMONITOR_H
00005 
00007 // LeaClassMonitor                                                     //
00008 //                                                                    //
00009 // Package: Lea (Leak Checker).                                       //
00010 //                                                                    //
00011 // Concept:  Monitor for objects of a single class.                   //
00012 //                                                                    //
00013 // N. West  03/2000                                                   //
00015 
00016 #include "Rtypes.h"
00017 #include <string>
00018 #include <iosfwd>
00019 
00020 class LeaClassMonitor;
00021 std::ostream& operator<<(std::ostream& s, LeaClassMonitor* m);
00022 
00023 class LeaClassMonitor
00024 {
00025 public:
00026 
00027 // Typedefs and enumerations
00028 
00029 // Constructors and destructors
00030            LeaClassMonitor();
00031   virtual ~LeaClassMonitor();
00032 
00033 // State testing member functions
00034          const Char_t* GetName() const { return fClassName.c_str();}
00035          UInt_t GetNumActive() const { return fNumActive; }
00036          UInt_t GetNumCreated() const { return fNumCreated; }
00037          std::ostream& Print(std::ostream& os);
00038 
00039 // State changing member functions.
00040          Bool_t Add(const void* addr);
00041          void Reset();
00042            void SetName(const Char_t* name) { fClassName = name; }
00043          Bool_t Remove(const void* addr);
00044 
00045 
00046 private:
00047 
00048 // Data members
00049    std::string fClassName;      // Name of monitored class.
00050    Int_t fNumActive;            // Number currently active
00051    Int_t fNumCreated;           // Number of objects created.
00052 
00053 ClassDef(LeaClassMonitor,0)     // Monitor for objects of a single class.
00054 
00055 };
00056 
00057 
00058 #endif  // LEACLASSMONITOR_H

Generated on Mon Feb 15 11:06:51 2010 for loon by  doxygen 1.3.9.1