CVC3::DebugTimer Class Reference

Time counter. More...

#include <debug.h>

Collaboration diagram for CVC3::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 248 of file debug.h.


Constructor & Destructor Documentation

CVC3::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 256 of file debug.h.

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

CVC3::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 158 of file debug.cpp.

References d_clean_time, and d_time.

CVC3::DebugTimer::~DebugTimer (  ) 

Destructor.

Definition at line 134 of file debug.cpp.

References d_clean_time, and d_time.


Member Function Documentation

DebugTimer & CVC3::DebugTimer::operator= ( const DebugTimer timer  ) 

Assignment: same logistics as for the copy constructor.

Definition at line 171 of file debug.cpp.

References d_clean_time, and d_time.

void CVC3::DebugTimer::reset (  ) 

Set time to zero.

Definition at line 193 of file debug.cpp.

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

DebugTimer & CVC3::DebugTimer::operator+= ( const DebugTimer timer  ) 

Definition at line 197 of file debug.cpp.

References d_time.

DebugTimer & CVC3::DebugTimer::operator-= ( const DebugTimer timer  ) 

Definition at line 202 of file debug.cpp.

References d_time.

DebugTimer CVC3::DebugTimer::operator+ ( const DebugTimer timer  ) 

Produces new "private" timer.

Definition at line 208 of file debug.cpp.

References d_time, and DebugTimer().

DebugTimer CVC3::DebugTimer::operator- ( const DebugTimer timer  ) 

Produces new "private" timer.

Definition at line 213 of file debug.cpp.

References d_time, and DebugTimer().


Friends And Related Function Documentation

friend class Debug [friend]

Definition at line 283 of file debug.h.

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

Definition at line 219 of file debug.cpp.

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

Definition at line 222 of file debug.cpp.

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

Definition at line 225 of file debug.cpp.

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

Definition at line 228 of file debug.cpp.

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

Definition at line 231 of file debug.cpp.

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

Definition at line 234 of file debug.cpp.

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

Print the timer's value.

Definition at line 245 of file debug.cpp.


Member Data Documentation

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

The time value.

Definition at line 250 of file debug.h.

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

bool CVC3::DebugTimer::d_clean_time [private]

Set if we own *d_time.

Definition at line 251 of file debug.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jul 3 14:36:06 2007 for CVC3 by  doxygen 1.5.1