Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
Xtime Class Reference

#include <xtime.h>

Public Member Functions

 Xtime ()
 
 Xtime (Xtime &other)
 
 Xtime (time_t other)
 
 ~Xtime ()
 
void addSeconds (sint32 seconds)
 
bit8 getTime (int &month, int &mday, int &year, int &hour, int &minute, int &second) const
 
bit8 setTime (int month, int mday, int year, int hour, int minute, int second)
 
void update ()
 
sint32 getDay (void) const
 
sint32 getMsec (void) const
 
void setDay (sint32 day)
 
void setMsec (sint32 msec)
 
void set (sint32 newday, sint32 newmsec)
 
bit8 ParseDate (char *in)
 
bit8 FormatTime (char *out, char *format)
 
bit8 getTimeval (struct timeval &tv)
 
int getSecond (void) const
 
int getMinute (void) const
 
int getHour (void) const
 
int getMDay (void) const
 
int getWDay (void) const
 
int getYDay (void) const
 
int getMonth (void) const
 
int getYWeek (void) const
 
int getYear (void) const
 
bit8 setSecond (sint32 sec)
 
bit8 setMinute (sint32 min)
 
bit8 setHour (sint32 hour)
 
bit8 setYear (sint32 year)
 
bit8 setMonth (sint32 month)
 
bit8 setMDay (sint32 mday)
 
void normalize (void)
 
int compare (const Xtime &other) const
 
bit8 operator== (const Xtime &other) const
 
bit8 operator!= (const Xtime &other) const
 
bit8 operator< (const Xtime &other) const
 
bit8 operator> (const Xtime &other) const
 
bit8 operator<= (const Xtime &other) const
 
bit8 operator>= (const Xtime &other) const
 
Xtimeoperator= (const Xtime &other)
 
Xtimeoperator= (const time_t other)
 
Xtimeoperator+= (const Xtime &other)
 
Xtimeoperator-= (const Xtime &other)
 
Xtime operator+ (Xtime &other)
 
Xtime operator- (Xtime &other)
 
Xtimeoperator+= (const time_t other)
 
Xtimeoperator-= (const time_t other)
 
Xtime operator+ (time_t other)
 
Xtime operator- (time_t other)
 
 Xtime ()
 
 Xtime (Xtime &other)
 
 Xtime (time_t other)
 
 ~Xtime ()
 
void addSeconds (sint32 seconds)
 
bit8 getTime (int &month, int &mday, int &year, int &hour, int &minute, int &second) const
 
bit8 setTime (int month, int mday, int year, int hour, int minute, int second)
 
void update ()
 
sint32 getDay (void) const
 
sint32 getMsec (void) const
 
void setDay (sint32 day)
 
void setMsec (sint32 msec)
 
void set (sint32 newday, sint32 newmsec)
 
bit8 ParseDate (char *in)
 
bit8 FormatTime (char *out, char *format)
 
bit8 getTimeval (struct timeval &tv)
 
int getSecond (void) const
 
int getMinute (void) const
 
int getHour (void) const
 
int getMDay (void) const
 
int getWDay (void) const
 
int getYDay (void) const
 
int getMonth (void) const
 
int getYWeek (void) const
 
int getYear (void) const
 
bit8 setSecond (sint32 sec)
 
bit8 setMinute (sint32 min)
 
bit8 setHour (sint32 hour)
 
bit8 setYear (sint32 year)
 
bit8 setMonth (sint32 month)
 
bit8 setMDay (sint32 mday)
 
void normalize (void)
 
int compare (const Xtime &other) const
 
bit8 operator== (const Xtime &other) const
 
bit8 operator!= (const Xtime &other) const
 
bit8 operator< (const Xtime &other) const
 
bit8 operator> (const Xtime &other) const
 
bit8 operator<= (const Xtime &other) const
 
bit8 operator>= (const Xtime &other) const
 
Xtimeoperator= (const Xtime &other)
 
Xtimeoperator= (const time_t other)
 
Xtimeoperator+= (const Xtime &other)
 
Xtimeoperator-= (const Xtime &other)
 
Xtime operator+ (Xtime &other)
 
Xtime operator- (Xtime &other)
 
Xtimeoperator+= (const time_t other)
 
Xtimeoperator-= (const time_t other)
 
Xtime operator+ (time_t other)
 
Xtime operator- (time_t other)
 

Protected Attributes

sint32 day_
 
sint32 msec_
 

Detailed Description

Definition at line 55 of file xtime.h.

Constructor & Destructor Documentation

◆ Xtime() [1/6]

Xtime::Xtime ( void )

Definition at line 222 of file xtime.cpp.

◆ Xtime() [2/6]

Xtime::Xtime ( Xtime & other)

Definition at line 230 of file xtime.cpp.

◆ Xtime() [3/6]

Xtime::Xtime ( time_t other)

Definition at line 239 of file xtime.cpp.

◆ ~Xtime() [1/2]

Xtime::~Xtime ( )

Definition at line 247 of file xtime.cpp.

◆ Xtime() [4/6]

Xtime::Xtime ( )

◆ Xtime() [5/6]

Xtime::Xtime ( Xtime & other)

◆ Xtime() [6/6]

Xtime::Xtime ( time_t other)

◆ ~Xtime() [2/2]

Xtime::~Xtime ( )

Member Function Documentation

◆ addSeconds() [1/2]

void Xtime::addSeconds ( sint32 seconds)

Definition at line 254 of file xtime.cpp.

◆ addSeconds() [2/2]

void Xtime::addSeconds ( sint32 seconds)

◆ compare() [1/2]

int Xtime::compare ( const Xtime & other) const

Definition at line 870 of file xtime.cpp.

◆ compare() [2/2]

int Xtime::compare ( const Xtime & other) const

◆ FormatTime() [1/2]

bit8 Xtime::FormatTime ( char * out,
char * format )

Definition at line 315 of file xtime.cpp.

◆ FormatTime() [2/2]

bit8 Xtime::FormatTime ( char * out,
char * format )

◆ getDay() [1/2]

sint32 Xtime::getDay ( void ) const

Definition at line 626 of file xtime.cpp.

◆ getDay() [2/2]

sint32 Xtime::getDay ( void ) const

◆ getHour() [1/2]

int Xtime::getHour ( void ) const

Definition at line 753 of file xtime.cpp.

◆ getHour() [2/2]

int Xtime::getHour ( void ) const

◆ getMDay() [1/2]

int Xtime::getMDay ( void ) const

Definition at line 759 of file xtime.cpp.

◆ getMDay() [2/2]

int Xtime::getMDay ( void ) const

◆ getMinute() [1/2]

int Xtime::getMinute ( void ) const

Definition at line 747 of file xtime.cpp.

◆ getMinute() [2/2]

int Xtime::getMinute ( void ) const

◆ getMonth() [1/2]

int Xtime::getMonth ( void ) const

Definition at line 766 of file xtime.cpp.

◆ getMonth() [2/2]

int Xtime::getMonth ( void ) const

◆ getMsec() [1/2]

sint32 Xtime::getMsec ( void ) const

Definition at line 632 of file xtime.cpp.

◆ getMsec() [2/2]

sint32 Xtime::getMsec ( void ) const

◆ getSecond() [1/2]

int Xtime::getSecond ( void ) const

Definition at line 741 of file xtime.cpp.

◆ getSecond() [2/2]

int Xtime::getSecond ( void ) const

◆ getTime() [1/2]

bit8 Xtime::getTime ( int & month,
int & mday,
int & year,
int & hour,
int & minute,
int & second ) const

Definition at line 704 of file xtime.cpp.

◆ getTime() [2/2]

bit8 Xtime::getTime ( int & month,
int & mday,
int & year,
int & hour,
int & minute,
int & second ) const

◆ getTimeval() [1/2]

bit8 Xtime::getTimeval ( struct timeval & tv)

Definition at line 661 of file xtime.cpp.

◆ getTimeval() [2/2]

bit8 Xtime::getTimeval ( struct timeval & tv)

◆ getWDay() [1/2]

int Xtime::getWDay ( void ) const

◆ getWDay() [2/2]

int Xtime::getWDay ( void ) const

◆ getYDay() [1/2]

int Xtime::getYDay ( void ) const

Definition at line 689 of file xtime.cpp.

◆ getYDay() [2/2]

int Xtime::getYDay ( void ) const

◆ getYear() [1/2]

int Xtime::getYear ( void ) const

Definition at line 774 of file xtime.cpp.

◆ getYear() [2/2]

int Xtime::getYear ( void ) const

◆ getYWeek() [1/2]

int Xtime::getYWeek ( void ) const

◆ getYWeek() [2/2]

int Xtime::getYWeek ( void ) const

◆ normalize() [1/2]

void Xtime::normalize ( void )

Definition at line 268 of file xtime.cpp.

◆ normalize() [2/2]

void Xtime::normalize ( void )

◆ operator!=() [1/2]

bit8 Xtime::operator!= ( const Xtime & other) const

Definition at line 895 of file xtime.cpp.

◆ operator!=() [2/2]

bit8 Xtime::operator!= ( const Xtime & other) const

◆ operator+() [1/4]

Xtime Xtime::operator+ ( time_t other)

Definition at line 1002 of file xtime.cpp.

◆ operator+() [2/4]

Xtime Xtime::operator+ ( time_t other)

◆ operator+() [3/4]

Xtime Xtime::operator+ ( Xtime & other)

Definition at line 964 of file xtime.cpp.

◆ operator+() [4/4]

Xtime Xtime::operator+ ( Xtime & other)

◆ operator+=() [1/4]

Xtime & Xtime::operator+= ( const time_t other)

Definition at line 980 of file xtime.cpp.

◆ operator+=() [2/4]

Xtime & Xtime::operator+= ( const time_t other)

◆ operator+=() [3/4]

Xtime & Xtime::operator+= ( const Xtime & other)

Definition at line 941 of file xtime.cpp.

◆ operator+=() [4/4]

Xtime & Xtime::operator+= ( const Xtime & other)

◆ operator-() [1/4]

Xtime Xtime::operator- ( time_t other)

Definition at line 994 of file xtime.cpp.

◆ operator-() [2/4]

Xtime Xtime::operator- ( time_t other)

◆ operator-() [3/4]

Xtime Xtime::operator- ( Xtime & other)

Definition at line 957 of file xtime.cpp.

◆ operator-() [4/4]

Xtime Xtime::operator- ( Xtime & other)

◆ operator-=() [1/4]

Xtime & Xtime::operator-= ( const time_t other)

Definition at line 987 of file xtime.cpp.

◆ operator-=() [2/4]

Xtime & Xtime::operator-= ( const time_t other)

◆ operator-=() [3/4]

Xtime & Xtime::operator-= ( const Xtime & other)

Definition at line 949 of file xtime.cpp.

◆ operator-=() [4/4]

Xtime & Xtime::operator-= ( const Xtime & other)

◆ operator<() [1/2]

bit8 Xtime::operator< ( const Xtime & other) const

Definition at line 904 of file xtime.cpp.

◆ operator<() [2/2]

bit8 Xtime::operator< ( const Xtime & other) const

◆ operator<=() [1/2]

bit8 Xtime::operator<= ( const Xtime & other) const

Definition at line 922 of file xtime.cpp.

◆ operator<=() [2/2]

bit8 Xtime::operator<= ( const Xtime & other) const

◆ operator=() [1/4]

Xtime & Xtime::operator= ( const time_t other)

Definition at line 1009 of file xtime.cpp.

◆ operator=() [2/4]

Xtime & Xtime::operator= ( const time_t other)

◆ operator=() [3/4]

Xtime & Xtime::operator= ( const Xtime & other)

Definition at line 972 of file xtime.cpp.

◆ operator=() [4/4]

Xtime & Xtime::operator= ( const Xtime & other)

◆ operator==() [1/2]

bit8 Xtime::operator== ( const Xtime & other) const

Definition at line 886 of file xtime.cpp.

◆ operator==() [2/2]

bit8 Xtime::operator== ( const Xtime & other) const

◆ operator>() [1/2]

bit8 Xtime::operator> ( const Xtime & other) const

Definition at line 913 of file xtime.cpp.

◆ operator>() [2/2]

bit8 Xtime::operator> ( const Xtime & other) const

◆ operator>=() [1/2]

bit8 Xtime::operator>= ( const Xtime & other) const

Definition at line 931 of file xtime.cpp.

◆ operator>=() [2/2]

bit8 Xtime::operator>= ( const Xtime & other) const

◆ ParseDate() [1/2]

bit8 Xtime::ParseDate ( char * in)

◆ ParseDate() [2/2]

bit8 Xtime::ParseDate ( char * in)

◆ set() [1/2]

void Xtime::set ( sint32 newday,
sint32 newmsec )

Definition at line 650 of file xtime.cpp.

◆ set() [2/2]

void Xtime::set ( sint32 newday,
sint32 newmsec )

◆ setDay() [1/2]

void Xtime::setDay ( sint32 day)

Definition at line 638 of file xtime.cpp.

◆ setDay() [2/2]

void Xtime::setDay ( sint32 day)

◆ setHour() [1/2]

bit8 Xtime::setHour ( sint32 hour)

Definition at line 807 of file xtime.cpp.

◆ setHour() [2/2]

bit8 Xtime::setHour ( sint32 hour)

◆ setMDay() [1/2]

bit8 Xtime::setMDay ( sint32 mday)

Definition at line 850 of file xtime.cpp.

◆ setMDay() [2/2]

bit8 Xtime::setMDay ( sint32 mday)

◆ setMinute() [1/2]

bit8 Xtime::setMinute ( sint32 min)

Definition at line 796 of file xtime.cpp.

◆ setMinute() [2/2]

bit8 Xtime::setMinute ( sint32 min)

◆ setMonth() [1/2]

bit8 Xtime::setMonth ( sint32 month)

Definition at line 834 of file xtime.cpp.

◆ setMonth() [2/2]

bit8 Xtime::setMonth ( sint32 month)

◆ setMsec() [1/2]

void Xtime::setMsec ( sint32 msec)

Definition at line 644 of file xtime.cpp.

◆ setMsec() [2/2]

void Xtime::setMsec ( sint32 msec)

◆ setSecond() [1/2]

bit8 Xtime::setSecond ( sint32 sec)

Definition at line 785 of file xtime.cpp.

◆ setSecond() [2/2]

bit8 Xtime::setSecond ( sint32 sec)

◆ setTime() [1/2]

bit8 Xtime::setTime ( int month,
int mday,
int year,
int hour,
int minute,
int second )

Definition at line 680 of file xtime.cpp.

◆ setTime() [2/2]

bit8 Xtime::setTime ( int month,
int mday,
int year,
int hour,
int minute,
int second )

◆ setYear() [1/2]

bit8 Xtime::setYear ( sint32 year)

Definition at line 819 of file xtime.cpp.

◆ setYear() [2/2]

bit8 Xtime::setYear ( sint32 year)

◆ update() [1/2]

void Xtime::update ( void )

Definition at line 284 of file xtime.cpp.

◆ update() [2/2]

void Xtime::update ( )

Member Data Documentation

◆ day_

sint32 Xtime::day_
protected

Definition at line 142 of file xtime.h.

◆ msec_

sint32 Xtime::msec_
protected

Definition at line 143 of file xtime.h.


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