Public Types | Public Member Functions | Protected Attributes

Logging::StopWatch Class Reference

the implementation is based on LogTrace. It probably could be merged together. More...

#include <loggingStopWatch.h>

Collaboration diagram for Logging::StopWatch:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Loki::SmartPtr
< StopWatch, Loki::NoCopy,
Loki::DisallowConversion,
Loki::RejectNull,
Loki::DefaultSPStorage > 
StopWatchSmartPtr
 LogTrace smart pointer.

Public Member Functions

 StopWatch (Logger::LoggerSmartPtr logger, const std::string &file, unsigned long line, const std::string &msg, double maxTime=0.0)
 ~StopWatch ()

Protected Attributes

Logger::LoggerSmartPtr logger_m
std::string msg_m
std::string fileName_m
unsigned long lineNumber_m
double maxTime_m
ACE_Time_Value startTime_m
ACE_Time_Value endTime_m

Detailed Description

the implementation is based on LogTrace. It probably could be merged together.

The idea of the StopWatch class is to measure the time a certain operation or block of operations take. In the ctor the timer starts and it stops in dtor, in other words. When a StopWatch object is created the stop watch starts and it stops when the object is deleted - it goes out of scope. At the moment the class is located in the logging module because it uses logging facilities.


Member Typedef Documentation

typedef Loki::SmartPtr<StopWatch, Loki::NoCopy, Loki::DisallowConversion, Loki::RejectNull, Loki::DefaultSPStorage> Logging::StopWatch::StopWatchSmartPtr

LogTrace smart pointer.


Constructor & Destructor Documentation

Logging::StopWatch::StopWatch ( Logger::LoggerSmartPtr  logger,
const std::string &  file,
unsigned long  line,
const std::string &  msg,
double  maxTime = 0.0 
)
Logging::StopWatch::~StopWatch (  ) 

Member Data Documentation

ACE_Time_Value Logging::StopWatch::endTime_m [protected]
std::string Logging::StopWatch::fileName_m [protected]
unsigned long Logging::StopWatch::lineNumber_m [protected]
double Logging::StopWatch::maxTime_m [protected]
std::string Logging::StopWatch::msg_m [protected]
ACE_Time_Value Logging::StopWatch::startTime_m [protected]

The documentation for this class was generated from the following file: