Time Class Reference

A representation of a clock time. More...

#include <Time.h++>

Inheritance diagram for Time:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 Time () throw ()
 Construct a new Time initialized to 0:00:00:000.
 Time (uint_t hour, uint_t minute, uint_t second=0, uint_t msec=0) throw ()
 Construct a new Time with the given components.
 Time (const Time &other) throw ()
 Copy constructor.
virtual ~Time () throw ()
 Destructor.
void setHour (uint_t hour) throw ()
 Set the hour component of the time.
void setHour12 (uint_t hour, bool pm=false) throw ()
 Set the hour component of the time (12-hour clock).
void setMinute (uint_t minute) throw ()
 Set the minute component of the time.
void setSecond (uint_t second) throw ()
 Set the second component of the time.
void setMillisecond (uint_t msec) throw ()
 Set the millisecond component of the time.
void setTime (uint_t hour, uint_t minute, uint_t second=0, uint_t msec=0) throw ()
 Set the hour, minute, second, and millisecond components of the time.
uint_t getHour () const throw ()
 Get the hour component of the time.
uint_t getHour12 () const throw ()
 Get the hour component of the time (12-hour clock).
bool isPM () const throw ()
 Test if the hour is post meridiem.
bool isAM () const throw ()
 Test if the hour is ante meridiem.
uint_t getMinute () const throw ()
 Get the minute component of the time.
uint_t getSecond () const throw ()
 Get the second component of the time.
uint_t getMillisecond () const throw ()
 Get the millisecond component of the time.
bool operator== (const Time &other) const throw ()
bool operator< (const Time &other) const throw ()
bool operator<= (const Time &other) const throw ()
bool operator!= (const Time &other) const throw ()
bool operator> (const Time &other) const throw ()
bool operator>= (const Time &other) const throw ()
Timeoperator= (const Time &other) throw ()

Protected Attributes

uint_t _hour
uint_t _minute
uint_t _second
uint_t _msec


Detailed Description

A representation of a clock time.

Author:
Mark Lindner

Constructor & Destructor Documentation

Time (  )  throw ()

Construct a new Time initialized to 0:00:00:000.

Time ( uint_t  hour,
uint_t  minute,
uint_t  second = 0,
uint_t  msec = 0 
) throw ()

Construct a new Time with the given components.

Time ( const Time other  )  throw ()

Copy constructor.

~Time (  )  throw () [virtual]

Destructor.


Member Function Documentation

uint_t getHour (  )  const throw () [inline]

Get the hour component of the time.

uint_t getHour12 (  )  const throw () [inline]

Get the hour component of the time (12-hour clock).

uint_t getMillisecond (  )  const throw () [inline]

Get the millisecond component of the time.

uint_t getMinute (  )  const throw () [inline]

Get the minute component of the time.

uint_t getSecond (  )  const throw () [inline]

Get the second component of the time.

bool isAM (  )  const throw () [inline]

Test if the hour is ante meridiem.

bool isPM (  )  const throw () [inline]

Test if the hour is post meridiem.

bool operator!= ( const Time other  )  const throw () [inline]

bool operator< ( const Time other  )  const throw ()

bool operator<= ( const Time other  )  const throw ()

Time & operator= ( const Time other  )  throw ()

bool operator== ( const Time other  )  const throw ()

bool operator> ( const Time other  )  const throw () [inline]

bool operator>= ( const Time other  )  const throw () [inline]

void setHour ( uint_t  hour  )  throw ()

Set the hour component of the time.

void setHour12 ( uint_t  hour,
bool  pm = false 
) throw ()

Set the hour component of the time (12-hour clock).

void setMillisecond ( uint_t  msec  )  throw ()

Set the millisecond component of the time.

void setMinute ( uint_t  minute  )  throw ()

Set the minute component of the time.

void setSecond ( uint_t  second  )  throw ()

Set the second component of the time.

void setTime ( uint_t  hour,
uint_t  minute,
uint_t  second = 0,
uint_t  msec = 0 
) throw ()

Set the hour, minute, second, and millisecond components of the time.

Reimplemented in DateTime.


Member Data Documentation

uint_t _hour [protected]

uint_t _minute [protected]

uint_t _msec [protected]

uint_t _second [protected]


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

Generated on Sat Apr 17 23:03:10 2010 for libcommonc++ by  doxygen 1.5.9