OSB_LIB::Time Class Reference

Collaboration diagram for OSB_LIB::Time:

Collaboration graph
[legend]
List of all members.

Detailed Description

Time class.

This class provides time operations.

Definition at line 282 of file chrono.h.

Public Member Functions

Read access functions
Time arithemtics functions
Time arithemtics operators.
Comparison operators.

Static Public Member Functions

Private Member Functions

Private Attributes


Constructor & Destructor Documentation

OSB_LIB::Time::Time ( int  sec = 0  )  [inline, explicit]

Constructor with optinal seconds.

When used as default constructor the time is set to '00:00:00'.

Definition at line 689 of file chrono.h.

OSB_LIB::Time::Time ( int  hour,
int  min,
int  sec 
)

Constructor with hour, minutes and seconds.

Exceptions:
OsbException if a component other than the biggest one is negative.

OSB_LIB::Time::Time ( const std::string &  src  )  [explicit]

Construct from string, format '[-]hh:mm:ss'.

Exceptions:
OsbException if src contains invalid characters.
OsbException if a component other than the biggest one is negative.


Member Function Documentation

Time& OSB_LIB::Time::addHours ( int   ) 

Add n hours.

Time& OSB_LIB::Time::addMinutes ( int   ) 

Add n minutes.

Time& OSB_LIB::Time::addSeconds ( long   ) 

Add n seconds.

void OSB_LIB::Time::getHms ( int &  hour,
int &  min,
int &  sec 
) const [inline]

Get hour, minutes and seconds.

Definition at line 323 of file chrono.h.

References t2hms().

void OSB_LIB::Time::hms2t ( int  hour,
int  min,
int  sec 
) [private]

Convert hour,min,sec to t.

int OSB_LIB::Time::hour (  )  const

Returns hour.

int OSB_LIB::Time::minute (  )  const

Returns min.

static Time OSB_LIB::Time::now (  )  [static]

Get current system time.

long OSB_LIB::Time::numSeconds (  )  const [inline]

Returns the number of seconds.

Definition at line 695 of file chrono.h.

References t_.

bool OSB_LIB::Time::operator!= ( const Time  )  const

Operator!=.

Time& OSB_LIB::Time::operator+ ( const Time  ) 

Add function.

Time& OSB_LIB::Time::operator+= ( const Time  ) 

Add function.

Time& OSB_LIB::Time::operator- ( const Time  ) 

Subtract function.

Time& OSB_LIB::Time::operator-= ( const Time  ) 

Subtract function.

bool OSB_LIB::Time::operator< ( const Time  )  const

Operator<.

bool OSB_LIB::Time::operator<= ( const Time  )  const

Operator<=.

bool OSB_LIB::Time::operator== ( const Time  )  const

Operator==.

bool OSB_LIB::Time::operator> ( const Time  )  const

Operator>.

bool OSB_LIB::Time::operator>= ( const Time  )  const

Operator>=.

int OSB_LIB::Time::second (  )  const

Returns seconds.

std::string OSB_LIB::Time::str (  )  const

Return Time as a string.

void OSB_LIB::Time::t2hms ( int &  hour,
int &  min,
int &  sec 
) const [private]

Convert t to hour,min,sec.

Referenced by getHms().


Member Data Documentation

long OSB_LIB::Time::t_ [private]

nr of secs in this Time obj.

Definition at line 369 of file chrono.h.

Referenced by numSeconds().


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:11:01 2006 for OSB Library by  doxygen 1.4.7