Main Page   Compound List   File List   Compound Members   File Members  

KMtraceLeak Class Reference

The model of a memory leak. More...

#include <KMtraceLeak.hh>

Collaboration diagram for KMtraceLeak:

Collaboration graph
[legend]
List of all members.

Signals

void suppressionChanged (KMtraceLeak *leak)

Public Methods

 KMtraceLeak ()
 KMtraceLeak (int blocks, int bytes, int firstBytes, QString firstAddress)
int getBlocks ()
int getBytes ()
int getFirstBytes ()
QString getFirstAddress ()
void addCall (KMtraceCall *call)
KMtraceCallStackgetCallStack ()
void setSuppressed (bool suppressed)
bool isSuppressed ()
void setView (KMtraceLeaksViewItem *kitem)
KMtraceLeaksViewItemgetView ()

Private Attributes

int m_blocks
int m_bytes
int m_firstBytes
QString m_firstAddress
KMtraceCallStack m_callStack
bool m_suppressed
KMtraceLeaksViewItemm_kitem

Detailed Description

The model of a memory leak.

The model of a memory leak. A memory leak has the following properties:

These values can be only accessed via the getXXX methods.

The model is currently used by one view/control element the KMtraceLeaksViewItem . Only a one to one relation is implemented at the moment.

Each memory leak has a function call stack, represented as a KMtraceCallStack .

Author:
Andreas Baumann <andreas_baumann@users.sourceforge.net>
See also:
KMtraceLeaksViewItem, KMtraceCallStack, KMtraceCall
Version:


Constructor & Destructor Documentation

KMtraceLeak::KMtraceLeak  
 

KMtraceLeak::KMtraceLeak int    blocks,
int    bytes,
int    firstBytes,
QString    firstAddress
 


Member Function Documentation

void KMtraceLeak::addCall KMtraceCall   call
 

Adds a function call to the memory leak. Could also be seen as being part of the construction process of a memory leak object. Used by the KMtraceModel ::readModel method while parsing the kmtrace tree file and add one call stack after the other.

Parameters:
call the function to be added at the end of the current call stack of the object

int KMtraceLeak::getBlocks  
 

int KMtraceLeak::getBytes  
 

KMtraceCallStack * KMtraceLeak::getCallStack  
 

Get the function call stack of the memory leak.

Returns:
the function call stack of the memory leak

QString KMtraceLeak::getFirstAddress  
 

int KMtraceLeak::getFirstBytes  
 

KMtraceLeaksViewItem * KMtraceLeak::getView  
 

Get the registered view to this model. Especially useful to get to the view which must be changed based on the signal suppressionChanged .

Returns:
the view object to this model

bool KMtraceLeak::isSuppressed  
 

Returns whether the memory leak is currently suppressed or not.

Returns:
suppression state of the leak

void KMtraceLeak::setSuppressed bool    suppressed
 

Suppress or show the memory leak. Suppressed leaks are normally not shown to the user by the view object because they are e.g. library functions the programmer is not willing to fix.

Parameters:
suppressed set the state to suppressed or not suppressed

void KMtraceLeak::setView KMtraceLeaksViewItem   kitem
 

Register the view/control object to this model

Parameters:
kitem the view item to be registerd

void KMtraceLeak::suppressionChanged KMtraceLeak *    leak [signal]
 

The signal being emmited if the leak has been set in state suppressed (i.e. the user marks the leak as not interresting and it should be suppressed, see also method setSuppressed .

Parameters:
leak the model of the leak which emmits the signal
suppressed the flag indicating whether the leak is now suppressed or not.


Member Data Documentation

int KMtraceLeak::m_blocks [private]
 

int KMtraceLeak::m_bytes [private]
 

KMtraceCallStack KMtraceLeak::m_callStack [private]
 

QString KMtraceLeak::m_firstAddress [private]
 

int KMtraceLeak::m_firstBytes [private]
 

KMtraceLeaksViewItem* KMtraceLeak::m_kitem [private]
 

bool KMtraceLeak::m_suppressed [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Jan 3 11:42:31 2003 for kmtraceviewer by doxygen1.3-rc1