TdkSimpleProfilerEntry Class Reference
[The TDK utilities group.]

#include <TdkSimpleProfilerEntry.h>

List of all members.

Public Types

typedef unsigned long EntryId_t

Public Member Functions

 TdkSimpleProfilerEntry (const TdkSimpleProfilerEntry::EntryId_t entryId, std::string sName)
virtual ~TdkSimpleProfilerEntry ()
 Virtual destructor.
void beginTimer (void)
 Marks the begining usage time of a piece of code.
void endTimer (void)
 Marks the ending usage time of a piece of code.
bool getElapsedTime (double &elapsedTime)
std::string getName (void)
TdkSimpleProfilerEntry::EntryId_t getId (void)

Private Member Functions

double getTimeSecsNow (void)

Private Attributes

double _tBeginSecs
 time set by the beginTimer().
double _tEndSecs
 time set by the endTimer().
EntryId_t _id
std::string _sName
 identifier name of the profile entry.


Detailed Description

Simple profile entry class. This class can be used to make raw measures of usage of a single piece of code.


Member Typedef Documentation

typedef unsigned long TdkSimpleProfilerEntry::EntryId_t


Constructor & Destructor Documentation

TdkSimpleProfilerEntry::TdkSimpleProfilerEntry ( const TdkSimpleProfilerEntry::EntryId_t  entryId,
std::string  sName 
)

Constructor.

Parameters:
This profile entry's identification id.
Name of the this profile entry.

TdkSimpleProfilerEntry::~TdkSimpleProfilerEntry (  )  [virtual]

Virtual destructor.


Member Function Documentation

void TdkSimpleProfilerEntry::beginTimer ( void   ) 

Marks the begining usage time of a piece of code.

void TdkSimpleProfilerEntry::endTimer ( void   ) 

Marks the ending usage time of a piece of code.

bool TdkSimpleProfilerEntry::getElapsedTime ( double &  elapsedTime  ) 

Returns the profiled time between the begin and end timer.

Parameters:
the time elapsed between the beginTimer and endTimer calls.
Returns:
if this profile entry has ended or not.

std::string TdkSimpleProfilerEntry::getName ( void   ) 

Gets the name of this profile entry.

Returns:
name of this profile entry.

TdkSimpleProfilerEntry::EntryId_t TdkSimpleProfilerEntry::getId ( void   ) 

double TdkSimpleProfilerEntry::getTimeSecsNow ( void   )  [private]

Helper function that returns the number of clock seconds elapsed since the program was launched.

Returns:
the number of clock seconds (milliseconds precision) elapsed since the program was launched.


Member Data Documentation

double TdkSimpleProfilerEntry::_tBeginSecs [private]

time set by the beginTimer().

double TdkSimpleProfilerEntry::_tEndSecs [private]

time set by the endTimer().

EntryId_t TdkSimpleProfilerEntry::_id [private]

std::string TdkSimpleProfilerEntry::_sName [private]

identifier name of the profile entry.


The documentation for this class was generated from the following files:
Generated on Fri Jun 15 16:54:55 2007 for TDK by  doxygen 1.5.2