Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

Time Class Reference

The Time class uses a integer representation of the current time. Integer based time class. More...

#include <numbers.h>

Inheritance diagram for Time:

Datetime List of all members.

Public Member Functions

 Time (time_t tm)
 Time (tm *dt)
 Time (char *str, size_t size=0)
 Time (int hour, int minute, int second)
 Time ()
long getValue (void) const
int getHour (void) const
int getMinute (void) const
int getSecond (void) const
char * getTime (char *buffer) const
time_t getTime (void) const
tm * getTime (tm *buf) const
void setTime (char *str, size_t size=0)
bool isValid (void) const
 operator long ()
String operator() () const
Timeoperator++ ()
Timeoperator-- ()
Timeoperator+= (const int val)
Timeoperator-= (const int val)
int operator== (const Time &time)
int operator!= (const Time &time)
int operator< (const Time &time)
int operator<= (const Time &time)
int operator> (const Time &time)
int operator>= (const Time &time)
bool operator! () const

Protected Member Functions

void toSeconds (int hour, int minute, int second)
void fromSeconds (char *buf) const
virtual void Update (void)

Protected Attributes

long seconds

Friends

Time operator+ (const Time &time1, const Time &time2)
Time operator- (const Time &time1, const Time &time2)
Time operator+ (const Time &time, const int val)
Time operator- (const Time &time, const int val)
Time operator+ (const int val, const Time &time)
Time operator- (const int val, const Time &time)

Detailed Description

The Time class uses a integer representation of the current time. Integer based time class.

This is then manipulated in several forms and may be exported as needed.

Author:
Marcelo Dalmas <mad@brasmap.com.br>


Constructor & Destructor Documentation

Time::Time time_t  tm  ) 
 

Time::Time tm *  dt  ) 
 

Time::Time char *  str,
size_t  size = 0
 

Time::Time int  hour,
int  minute,
int  second
 

Time::Time  ) 
 


Member Function Documentation

void Time::fromSeconds char *  buf  )  const [protected]
 

int Time::getHour void   )  const
 

int Time::getMinute void   )  const
 

int Time::getSecond void   )  const
 

tm* Time::getTime tm *  buf  )  const
 

time_t Time::getTime void   )  const
 

char* Time::getTime char *  buffer  )  const
 

long Time::getValue void   )  const
 

bool Time::isValid void   )  const
 

Reimplemented in Datetime.

Time::operator long  )  [inline]
 

bool Time::operator! void   )  const [inline]
 

Reimplemented in Datetime.

int Time::operator!= const Time time  ) 
 

String Time::operator()  )  const
 

Time& Time::operator++  ) 
 

Time& Time::operator+= const int  val  ) 
 

Time& Time::operator--  ) 
 

Time& Time::operator-= const int  val  ) 
 

int Time::operator< const Time time  ) 
 

int Time::operator<= const Time time  ) 
 

int Time::operator== const Time time  ) 
 

int Time::operator> const Time time  ) 
 

int Time::operator>= const Time time  ) 
 

void Time::setTime char *  str,
size_t  size = 0
 

void Time::toSeconds int  hour,
int  minute,
int  second
[protected]
 

virtual void Time::Update void   )  [inline, protected, virtual]
 


Friends And Related Function Documentation

Time operator+ const int  val,
const Time time
[friend]
 

Time operator+ const Time time,
const int  val
[friend]
 

Time operator+ const Time time1,
const Time time2
[friend]
 

Time operator- const int  val,
const Time time
[friend]
 

Time operator- const Time time,
const int  val
[friend]
 

Time operator- const Time time1,
const Time time2
[friend]
 


Member Data Documentation

long Time::seconds [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Jan 18 14:32:39 2005 for GNU CommonC++ by  doxygen 1.3.9.1