CVCL::DebugTimer Class Reference

Time counter. More...

#include <debug.h>

Collaboration diagram for CVCL::DebugTimer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Private Attributes

Friends


Detailed Description

Time counter.

Intended use is to store time intervals or accumulated time for multiple events (e.g. time spent to execute certain lines of code, or accumulated time spent in a particular function).

Definition at line 257 of file debug.h.


Constructor & Destructor Documentation

CVCL::DebugTimer::DebugTimer DebugTime time,
bool  take_time = false
[inline]
 

Constructor: takes the pointer to the actual time value.

It is either stored in class Debug below (then the timer is "public"), or we own it, making the timer "private".

Definition at line 265 of file debug.h.

Referenced by operator+(), and operator-().

CVCL::DebugTimer::DebugTimer const DebugTimer timer  ) 
 

Copy constructor: copy the *pointer* from public timers, and *value* from private.

The reason for different behavior for public and private time is the following. When you modify a public timer, you want the changes to show in the central database and everywhere else, whereas private timers are used as independent temporary variables holding intermediate time values.

Definition at line 165 of file debug.cpp.

References d_clean_time, and d_time.

CVCL::DebugTimer::~DebugTimer  ) 
 

Destructor.

Definition at line 141 of file debug.cpp.

References d_clean_time, and d_time.


Member Function Documentation

DebugTimer & CVCL::DebugTimer::operator= const DebugTimer timer  ) 
 

Assignment: same logistics as for the copy constructor.

Definition at line 178 of file debug.cpp.

References d_clean_time, and d_time.

void CVCL::DebugTimer::reset  ) 
 

Set time to zero.

Definition at line 200 of file debug.cpp.

References d_time, and CVCL::DebugTime::reset().

DebugTimer & CVCL::DebugTimer::operator+= const DebugTimer timer  ) 
 

Definition at line 204 of file debug.cpp.

References d_time.

DebugTimer & CVCL::DebugTimer::operator-= const DebugTimer timer  ) 
 

Definition at line 209 of file debug.cpp.

References d_time.

DebugTimer CVCL::DebugTimer::operator+ const DebugTimer timer  ) 
 

Produces new "private" timer.

Definition at line 215 of file debug.cpp.

References d_time, and DebugTimer().

DebugTimer CVCL::DebugTimer::operator- const DebugTimer timer  ) 
 

Produces new "private" timer.

Definition at line 220 of file debug.cpp.

References d_time, and DebugTimer().


Friends And Related Function Documentation

friend class Debug [friend]
 

Definition at line 292 of file debug.h.

bool operator== const DebugTimer t1,
const DebugTimer t2
[friend]
 

Definition at line 226 of file debug.cpp.

bool operator!= const DebugTimer t1,
const DebugTimer t2
[friend]
 

Definition at line 229 of file debug.cpp.

bool operator< const DebugTimer t1,
const DebugTimer t2
[friend]
 

Definition at line 232 of file debug.cpp.

bool operator> const DebugTimer t1,
const DebugTimer t2
[friend]
 

Definition at line 237 of file debug.cpp.

bool operator<= const DebugTimer t1,
const DebugTimer t2
[friend]
 

Definition at line 242 of file debug.cpp.

bool operator>= const DebugTimer t1,
const DebugTimer t2
[friend]
 

Definition at line 247 of file debug.cpp.

std::ostream& operator<< std::ostream &  os,
const DebugTimer timer
[friend]
 

Print the timer's value.


Member Data Documentation

DebugTime* CVCL::DebugTimer::d_time [private]
 

The time value.

Definition at line 259 of file debug.h.

Referenced by DebugTimer(), CVCL::operator!=(), operator+(), operator+=(), operator-(), operator-=(), CVCL::operator<(), CVCL::operator<<(), CVCL::operator<=(), operator=(), CVCL::operator==(), CVCL::operator>(), CVCL::operator>=(), reset(), CVCL::Debug::setCurrentTime(), CVCL::Debug::setElapsed(), and ~DebugTimer().

bool CVCL::DebugTimer::d_clean_time [private]
 

Set if we own *d_time.

Definition at line 260 of file debug.h.

Referenced by DebugTimer(), operator=(), and ~DebugTimer().


The documentation for this class was generated from the following files:
Generated on Thu Apr 13 16:57:43 2006 for CVC Lite by  doxygen 1.4.4