LeaClassMonitor Class Reference

#include <LeaClassMonitor.h>

List of all members.

Public Member Functions

 LeaClassMonitor ()
virtual ~LeaClassMonitor ()
const Char_t * GetName () const
UInt_t GetNumActive () const
UInt_t GetNumCreated () const
std::ostream & Print (std::ostream &os)
Bool_t Add (const void *addr)
void Reset ()
void SetName (const Char_t *name)
Bool_t Remove (const void *addr)

Private Attributes

std::string fClassName
Int_t fNumActive
Int_t fNumCreated

Detailed Description

Definition at line 23 of file LeaClassMonitor.h.


Constructor & Destructor Documentation

LeaClassMonitor::LeaClassMonitor (  ) 

Definition at line 73 of file LeaClassMonitor.cxx.

References Msg::kDebug, and MSG.

00073                                  :
00074 fClassName(""),
00075 fNumActive(0),
00076 fNumCreated(0)
00077 {
00078 
00079 
00080 //  Purpose:  Default constructor.
00081 
00082 //  Arguments: 
00083 //    None.
00084 
00085 //  Return:   n/a
00086 
00087 //  Contact:   N. West
00088 
00089 //  Specification:-
00090 //  =============
00091 
00092 //  o Create LeaClassMonitor.
00093 
00094 //  Program Notes:-
00095 //  =============
00096 
00097 //  None.
00098 
00099    MSG("Lea", Msg::kDebug) << "Creating LeaClassMonitor at "
00100                           << (void*) this << endl;
00101 
00102 }
//.....................................................................

LeaClassMonitor::~LeaClassMonitor (  )  [virtual]

Definition at line 105 of file LeaClassMonitor.cxx.

00105                                   {
00106 
00107 
00108 //  Purpose:  Destructor.
00109 
00110 //  Arguments: 
00111 //    None.
00112 
00113 //  Return:   n/a
00114 
00115 //  Contact:   N. West
00116 
00117 //  Specification:-
00118 //  =============
00119 
00120 //  o Destroy LeaClassMonitor.
00121 
00122 //  Program Notes:-
00123 //  =============
00124 
00125 //  None.
00126 
00127 }


Member Function Documentation

Bool_t LeaClassMonitor::Add ( const void *  addr  ) 

Definition at line 44 of file LeaClassMonitor.cxx.

00044                                            {
00045 
00046 //  Purpose:  Record creation of object.
00047 
00048 //  Arguments: 
00049 //    addr         in    Address of object.
00050 
00051 //  Return:  kTRUE always (reserved for future use). 
00052 
00053 //  Contact:   N. West
00054 
00055 //  Specification:-
00056 //  =============
00057 
00058 //  o  Record creation of object.
00059 
00060 //  Program Notes:-
00061 //  =============
00062 
00063 //  None.
00064 
00065   fNumCreated++;
00066   fNumActive++;
00067 // Invent use for addr.
00068   return addr != 0;
00069 
00070 }

const Char_t* LeaClassMonitor::GetName (  )  const [inline]

Definition at line 34 of file LeaClassMonitor.h.

References fClassName.

00034 { return fClassName.c_str();}

UInt_t LeaClassMonitor::GetNumActive (  )  const [inline]

Definition at line 35 of file LeaClassMonitor.h.

References fNumActive.

Referenced by LeaLeakChecker::GetNumActive().

00035 { return fNumActive; }

UInt_t LeaClassMonitor::GetNumCreated (  )  const [inline]

Definition at line 36 of file LeaClassMonitor.h.

References fNumCreated.

Referenced by LeaLeakChecker::GetNumCreated().

00036 { return fNumCreated; }

std::ostream& LeaClassMonitor::Print ( std::ostream &  os  ) 

Referenced by operator<<().

Bool_t LeaClassMonitor::Remove ( const void *  addr  ) 

Definition at line 162 of file LeaClassMonitor.cxx.

References fNumActive.

Referenced by LeaLeakChecker::Remove().

00162                                               {
00163 
00164 //  Purpose:  Record destruction of object.
00165 
00166 //  Arguments: 
00167 //    addr         in    Address of object.
00168 
00169 //  Return:  kTRUE always (reserved for future use). 
00170 
00171 //  Contact:   N. West
00172 
00173 //  Specification:-
00174 //  =============
00175 
00176 //  o  Record destruction of object.
00177 
00178 //  Program Notes:-
00179 //  =============
00180 
00181 //  None.
00182 
00183   fNumActive--;
00184   return kTRUE;
00185 
00186 // Invent use for addr.
00187   return addr != 0;
00188 
00189 }

void LeaClassMonitor::Reset (  ) 

Definition at line 193 of file LeaClassMonitor.cxx.

References fNumActive, and fNumCreated.

Referenced by LeaLeakChecker::Reset().

00193                             {
00194 
00195 
00196 //  Purpose:  Clear object counts.
00197 
00198 //  Arguments: 
00199 //   None
00200 
00201 //  Return:  None. 
00202 
00203 //  Contact:   N. West
00204 
00205 //  Specification:-
00206 //  =============
00207 
00208 //  o Clear object counts.
00209 
00210 //  Program Notes:-
00211 //  =============
00212 
00213 //  None.
00214 
00215   fNumActive = fNumCreated = 0;
00216 
00217 }

void LeaClassMonitor::SetName ( const Char_t *  name  )  [inline]

Definition at line 42 of file LeaClassMonitor.h.

References fClassName.

Referenced by LeaLeakChecker::GetMonitor().

00042 { fClassName = name; }


Member Data Documentation

std::string LeaClassMonitor::fClassName [private]

Definition at line 49 of file LeaClassMonitor.h.

Referenced by GetName(), and SetName().

Int_t LeaClassMonitor::fNumActive [private]

Definition at line 50 of file LeaClassMonitor.h.

Referenced by GetNumActive(), Remove(), and Reset().

Definition at line 51 of file LeaClassMonitor.h.

Referenced by GetNumCreated(), and Reset().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1