• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

kcachegrind

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CostItem Class Reference

#include <costitem.h>

Inheritance diagram for CostItem:
Inheritance graph
[legend]

Public Member Functions

 CostItem (ProfileContext *)
 
virtual ~CostItem ()
 
virtual void clear ()
 
ProfileContext * context () const
 
virtual QString costString (EventTypeSet *)
 
virtual TraceData * data ()
 
virtual const TraceData * data () const
 
CostItem * dependant ()
 
virtual QString formattedName () const
 
QString fullName () const
 
virtual void invalidate ()
 
virtual QString name () const
 
virtual TracePart * part ()
 
virtual const TracePart * part () const
 
virtual QString prettyName () const
 
void setContext (ProfileContext *context)
 
void setDependant (CostItem *d)
 
void setPosition (CostItem *p)
 
QString toString ()
 
ProfileContext::Type type () const
 

Protected Member Functions

virtual void update ()
 

Protected Attributes

ProfileContext * _context
 
CostItem * _dep
 
bool _dirty
 
CostItem * _position
 

Detailed Description

Base class for cost items.

Definition at line 37 of file costitem.h.

Constructor & Destructor Documentation

CostItem::CostItem ( ProfileContext *  c)

Definition at line 29 of file costitem.cpp.

CostItem::~CostItem ( )
virtual

Definition at line 38 of file costitem.cpp.

Member Function Documentation

void CostItem::clear ( )
virtual

Set all cost counters to zero.

Reimplemented in TraceInclusiveCost, TraceCallCost, TraceJumpCost, and ProfileCostArray.

Definition at line 42 of file costitem.cpp.

ProfileContext* CostItem::context ( ) const
inline

Definition at line 44 of file costitem.h.

QString CostItem::costString ( EventTypeSet *  )
virtual

Returns text of all cost metrics.

Reimplemented in TracePartFunction, TraceInclusiveCost, TraceCallCost, TraceJumpCost, and ProfileCostArray.

Definition at line 48 of file costitem.cpp.

TraceData * CostItem::data ( )
virtual

Reimplemented in TraceData.

Definition at line 111 of file costitem.cpp.

const TraceData * CostItem::data ( ) const
virtual

Reimplemented in TraceData.

Definition at line 116 of file costitem.cpp.

CostItem* CostItem::dependant ( )
inline

Definition at line 97 of file costitem.h.

QString CostItem::formattedName ( ) const
virtual

A HTMLified version of name, can return empty string.

Reimplemented in TraceFunction.

Definition at line 71 of file costitem.cpp.

QString CostItem::fullName ( ) const

Returns type name + dynamic name.

Definition at line 76 of file costitem.cpp.

void CostItem::invalidate ( )
virtual

Invalidate the cost attributes.

An invalidated object needs to be recalculated when a cost attribute is requested (e.g. by subCost()). Has to be overwritten by subclasses when the cost influences costs of other cost items. If only one item depends on the cost of this item, it can by set with setDependant() without a need for overwriting.

Reimplemented in ProfileCostArray.

Definition at line 87 of file costitem.cpp.

QString CostItem::name ( ) const
virtual

Returns dynamic name info (without type)

Reimplemented in TraceFunctionSource, TraceLineRegion, TraceCostItem, TraceLine, TraceInstr, TraceCall, TraceLineCall, TraceInstrCall, TraceLineJump, TraceInstrJump, and TracePart.

Definition at line 53 of file costitem.cpp.

TracePart * CostItem::part ( )
virtual

Reimplemented in TracePart.

Definition at line 101 of file costitem.cpp.

const TracePart * CostItem::part ( ) const
virtual

Reimplemented in TracePart.

Definition at line 106 of file costitem.cpp.

QString CostItem::prettyName ( ) const
virtual

Similar to name, but prettyfied = more descriptive to humans.

Reimplemented in TraceObject, TraceFile, TraceClass, TraceFunction, TraceLine, TraceInstr, TracePart, and TracePartClass.

Definition at line 65 of file costitem.cpp.

void CostItem::setContext ( ProfileContext *  context)
inline

Redefine the context after construction.

Definition at line 108 of file costitem.h.

void CostItem::setDependant ( CostItem *  d)
inline

Sets a dependant to be invalidated when this cost is invalidated.

Call this function directly after the constructor.

Definition at line 95 of file costitem.h.

void CostItem::setPosition ( CostItem *  p)
inline

If this item is from a single profile data file, position points to a TracePart, otherwise to a TraceData object.

Definition at line 103 of file costitem.h.

QString CostItem::toString ( )

Returns full name + cost text.

Definition at line 82 of file costitem.cpp.

ProfileContext::Type CostItem::type ( ) const
inline

Definition at line 45 of file costitem.h.

void CostItem::update ( )
protectedvirtual

Updates cost attributes.

This has to be called by subclasses that access cost attributes directly

Reimplemented in TraceData, TraceFunction, TraceFunctionSource, TraceLineRegion, TraceCall, TraceInstrJump, TracePartFunction, TracePartCall, TracePartLineRegion, TracePartLine, TracePartLineCall, TracePartLineJump, TracePartInstr, TracePartInstrCall, TracePartInstrJump, TraceInclusiveListCost, TraceCallListCost, TraceJumpListCost, TraceListCost, and ProfileCostArray.

Definition at line 96 of file costitem.cpp.

Member Data Documentation

ProfileContext* CostItem::_context
protected

Definition at line 123 of file costitem.h.

CostItem* CostItem::_dep
protected

Definition at line 127 of file costitem.h.

bool CostItem::_dirty
protected

Definition at line 124 of file costitem.h.

CostItem* CostItem::_position
protected

Definition at line 126 of file costitem.h.


The documentation for this class was generated from the following files:
  • costitem.h
  • costitem.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:03:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kcachegrind

Skip menu "kcachegrind"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal