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 ()
virtual ~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
Time& operator++ ()
Time& operator-- ()
Time& operator+= (const int val)
Time& operator-= (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 Methods

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

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 ( )
 

ost::Time::~Time ( ) [virtual]
 


Member Function Documentation

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

int ost::Time::getHour ( void ) const
 

int ost::Time::getMinute ( void ) const
 

int ost::Time::getSecond ( void ) const
 

tm * ost::Time::getTime ( tm * buf ) const
 

time_t ost::Time::getTime ( void ) const
 

char * ost::Time::getTime ( char * buffer ) const
 

long ost::Time::getValue ( void ) const
 

bool ost::Time::isValid ( void ) const
 

Reimplemented in ost::Datetime.

ost::Time::operator long ( ) [inline]
 

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

Reimplemented in ost::Datetime.

int ost::Time::operator!= ( const Time & time )
 

String ost::Time::operator() ( ) const
 

Time & ost::Time::operator++ ( void )
 

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

Time & ost::Time::operator-- ( void )
 

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

int ost::Time::operator< ( const Time & time )
 

int ost::Time::operator<= ( const Time & time )
 

int ost::Time::operator== ( const Time & time )
 

int ost::Time::operator> ( const Time & time )
 

int ost::Time::operator>= ( const Time & time )
 

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

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

void ost::Time::update ( void ) [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 ost::Time::seconds [protected]
 


The documentation for this class was generated from the following file:
Generated at Fri May 30 14:51:05 2008 for GNU CommonC++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001