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

ost::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 ost::Time:

ost::Datetime List of all members.

Public Methods

 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)
int getHour (void)
int getMinute (void)
int getSecond (void)
char * getTime (char *buffer)
time_t getTime (void)
tm * getTime (tm *buf)
void setTime (char *str, size_t size=0)
bool isValid (void)
 operator long ()
std::string operator() ()
Time & operator= (long sec)
Time & operator++ ()
Time & operator-- ()
Time & operator+= (int val)
Time & operator-= (int val)
int operator== (Time &time)
int operator!= (Time &time)
int operator< (Time &time)
int operator<= (Time &time)
int operator> (Time &time)
int operator>= (Time &time)
bool operator! ()

Protected Methods

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

Protected Attributes

long seconds

Friends

Time operator+ (Time &time1, Time &time2)
Time operator- (Time &time1, Time &time2)
Time operator+ (Time &time, int val)
Time operator- (Time &time, int val)
Time operator+ (int val, Time &time)
Time operator- (int val, 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

ost::Time::Time time_t    tm
 

ost::Time::Time tm *    dt
 

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

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

ost::Time::Time  
 


Member Function Documentation

void ost::Time::fromSeconds char *    buf [protected]
 

int ost::Time::getHour void   
 

int ost::Time::getMinute void   
 

int ost::Time::getSecond void   
 

tm* ost::Time::getTime tm *    buf
 

time_t ost::Time::getTime void   
 

char* ost::Time::getTime char *    buffer
 

long ost::Time::getValue void   
 

bool ost::Time::isValid void   
 

Reimplemented in ost::Datetime.

ost::Time::operator long   [inline]
 

bool ost::Time::operator! void    [inline]
 

int ost::Time::operator!= Time &    time
 

std::string ost::Time::operator()  
 

Time& ost::Time::operator++  
 

Time& ost::Time::operator+= int    val
 

Time& ost::Time::operator--  
 

Time& ost::Time::operator-= int    val
 

int ost::Time::operator< Time &    time
 

int ost::Time::operator<= Time &    time
 

Time& ost::Time::operator= long    sec
 

int ost::Time::operator== Time &    time
 

int ost::Time::operator> Time &    time
 

int ost::Time::operator>= Time &    time
 

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

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

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


Friends And Related Function Documentation

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

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

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

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

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

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


Member Data Documentation

long ost::Time::seconds [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Nov 21 12:28:33 2002 for GNU CommonC++ by doxygen1.2.18